Chromium Code Reviews| Index: components/exo/display.cc |
| diff --git a/components/exo/display.cc b/components/exo/display.cc |
| index fe97bc8c2446e2c0dc9d3fc0248ac61ce6754c21..c8cabb3ee13dba7ef320d278e63ed3ad047759e6 100644 |
| --- a/components/exo/display.cc |
| +++ b/components/exo/display.cc |
| @@ -24,12 +24,19 @@ |
| #if defined(USE_OZONE) |
| #include <GLES2/gl2extchromium.h> |
| #include "components/exo/buffer.h" |
| -#include "gpu/command_buffer/client/gpu_memory_buffer_manager.h" |
| +#include "gpu/ipc/client/gpu_memory_buffer_impl_ozone_native_pixmap.h" |
| #include "third_party/khronos/GLES2/gl2.h" |
| #include "third_party/khronos/GLES2/gl2ext.h" |
| -#include "ui/aura/env.h" |
| #endif |
| +#if defined(USE_OZONE) |
| +namespace { |
| + |
| +void DoNothing(const gpu::SyncToken& sync) {} |
|
reveman
2016/12/14 02:20:59
As this callback is going away completely in the n
sadrul
2016/12/14 03:06:01
Yep, done.
|
| + |
| +} // namespace |
| +#endif // defined(USE_OZONE) |
| + |
| namespace exo { |
| //////////////////////////////////////////////////////////////////////////////// |
| @@ -77,10 +84,9 @@ std::unique_ptr<Buffer> Display::CreateLinuxDMABufBuffer( |
| handle.native_pixmap_handle.planes.push_back(plane); |
| std::unique_ptr<gfx::GpuMemoryBuffer> gpu_memory_buffer = |
| - aura::Env::GetInstance() |
| - ->context_factory() |
| - ->GetGpuMemoryBufferManager() |
| - ->CreateGpuMemoryBufferFromHandle(handle, size, format); |
| + gpu::GpuMemoryBufferImplOzoneNativePixmap::CreateFromHandle( |
| + handle, size, format, gfx::BufferUsage::GPU_READ, |
| + base::Bind(&DoNothing)); |
| if (!gpu_memory_buffer) { |
| LOG(ERROR) << "Failed to create GpuMemoryBuffer from handle"; |
| return nullptr; |