Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2712)

Unified Diff: components/exo/display.cc

Issue 2572703004: exo: Directly create GpuMemoryBufferImpl when a handle is available. (Closed)
Patch Set: null callback Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/test/test_gpu_memory_buffer_manager.cc ('k') | components/exo/shared_memory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/exo/display.cc
diff --git a/components/exo/display.cc b/components/exo/display.cc
index fe97bc8c2446e2c0dc9d3fc0248ac61ce6754c21..505a7a7cd3472e0a9076e6c340c1974d91cfe98e 100644
--- a/components/exo/display.cc
+++ b/components/exo/display.cc
@@ -24,10 +24,9 @@
#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
namespace exo {
@@ -77,10 +76,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,
+ gpu::GpuMemoryBufferImpl::DestructionCallback());
if (!gpu_memory_buffer) {
LOG(ERROR) << "Failed to create GpuMemoryBuffer from handle";
return nullptr;
« no previous file with comments | « cc/test/test_gpu_memory_buffer_manager.cc ('k') | components/exo/shared_memory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698