From 39d357e3248f80abea0159765ff39554affb40db Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Wed, 4 Jan 2017 14:17:57 +0100 Subject: BASELINE: Update Chromium to 55.0.2883.105 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit And updates ninja to 1.7.2 Change-Id: I20d43c737f82764d857ada9a55586901b18b9243 Reviewed-by: Michael BrĂ¼ning --- chromium/components/exo/display.cc | 37 +++++++++++++++++-------------------- 1 file changed, 17 insertions(+), 20 deletions(-) (limited to 'chromium/components/exo/display.cc') diff --git a/chromium/components/exo/display.cc b/chromium/components/exo/display.cc index 03261baf3f1..df470b28122 100644 --- a/chromium/components/exo/display.cc +++ b/chromium/components/exo/display.cc @@ -55,15 +55,14 @@ std::unique_ptr Display::CreateSharedMemory( if (!base::SharedMemory::IsHandleValid(handle)) return nullptr; - return base::WrapUnique(new SharedMemory(handle)); + return base::MakeUnique(handle); } #if defined(USE_OZONE) std::unique_ptr Display::CreateLinuxDMABufBuffer( const gfx::Size& size, gfx::BufferFormat format, - const std::vector& strides, - const std::vector& offsets, + const std::vector& planes, std::vector&& fds) { TRACE_EVENT1("exo", "Display::CreateLinuxDMABufBuffer", "size", size.ToString()); @@ -73,11 +72,8 @@ std::unique_ptr Display::CreateLinuxDMABufBuffer( for (auto& fd : fds) handle.native_pixmap_handle.fds.emplace_back(std::move(fd)); - DCHECK_EQ(strides.size(), offsets.size()); - for (size_t plane = 0; plane < strides.size(); ++plane) { - handle.native_pixmap_handle.strides_and_offsets.emplace_back( - strides[plane], offsets[plane]); - } + for (auto& plane : planes) + handle.native_pixmap_handle.planes.push_back(plane); std::unique_ptr gpu_memory_buffer = aura::Env::GetInstance() @@ -94,15 +90,16 @@ std::unique_ptr Display::CreateLinuxDMABufBuffer( // List of overlay formats that are known to be supported. // TODO(reveman): Determine this at runtime. - const gfx::BufferFormat kOverlayFormats[] = {gfx::BufferFormat::BGRX_8888}; + const gfx::BufferFormat kOverlayFormats[] = {gfx::BufferFormat::RGBA_8888, + gfx::BufferFormat::RGBX_8888}; bool is_overlay_candidate = std::find(std::begin(kOverlayFormats), std::end(kOverlayFormats), format) != std::end(kOverlayFormats); - return base::WrapUnique(new Buffer( + return base::MakeUnique( std::move(gpu_memory_buffer), GL_TEXTURE_EXTERNAL_OES, // COMMANDS_COMPLETED queries are required by native pixmaps. - GL_COMMANDS_COMPLETED_CHROMIUM, use_zero_copy, is_overlay_candidate)); + GL_COMMANDS_COMPLETED_CHROMIUM, use_zero_copy, is_overlay_candidate); } #endif @@ -115,9 +112,9 @@ std::unique_ptr Display::CreateShellSurface(Surface* surface) { return nullptr; } - return base::WrapUnique( - new ShellSurface(surface, nullptr, gfx::Rect(), true /* activatable */, - ash::kShellWindowId_DefaultContainer)); + return base::MakeUnique(surface, nullptr, gfx::Rect(), + true /* activatable */, + ash::kShellWindowId_DefaultContainer); } std::unique_ptr Display::CreatePopupShellSurface( @@ -146,9 +143,9 @@ std::unique_ptr Display::CreatePopupShellSurface( ->window(), parent->GetWidget()->GetNativeWindow()->parent(), &initial_bounds); - return base::WrapUnique( - new ShellSurface(surface, parent, initial_bounds, false /* activatable */, - ash::kShellWindowId_DefaultContainer)); + return base::MakeUnique(surface, parent, initial_bounds, + false /* activatable */, + ash::kShellWindowId_DefaultContainer); } std::unique_ptr Display::CreateRemoteShellSurface( @@ -162,8 +159,8 @@ std::unique_ptr Display::CreateRemoteShellSurface( return nullptr; } - return base::WrapUnique(new ShellSurface(surface, nullptr, gfx::Rect(1, 1), - true /* activatable */, container)); + return base::MakeUnique(surface, nullptr, gfx::Rect(1, 1), + true /* activatable */, container); } std::unique_ptr Display::CreateSubSurface(Surface* surface, @@ -181,7 +178,7 @@ std::unique_ptr Display::CreateSubSurface(Surface* surface, return nullptr; } - return base::WrapUnique(new SubSurface(surface, parent)); + return base::MakeUnique(surface, parent); } std::unique_ptr Display::CreateNotificationSurface( -- cgit v1.2.1