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

Unified Diff: components/exo/display.cc

Issue 2572703004: exo: Directly create GpuMemoryBufferImpl when a handle is available. (Closed)
Patch Set: . 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..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;
« 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