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

Unified Diff: content/common/gpu/gpu_memory_buffer_factory_x11.cc

Issue 659883003: gpu: Move image creation part of GpuMemoryBufferFactory interface to gpu namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move-gpu-memory-buffer-manager-to-gpu
Patch Set: rebase Created 6 years, 2 months 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 | « content/common/gpu/gpu_memory_buffer_factory_win.cc ('k') | gpu/command_buffer/service/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/gpu_memory_buffer_factory_x11.cc
diff --git a/content/common/gpu/gpu_memory_buffer_factory_x11.cc b/content/common/gpu/gpu_memory_buffer_factory_x11.cc
index 2131eb161dc0451e8a0bf998aec70416d91d940f..0f713923c0cd5a24b81437d7239a781a2576481e 100644
--- a/content/common/gpu/gpu_memory_buffer_factory_x11.cc
+++ b/content/common/gpu/gpu_memory_buffer_factory_x11.cc
@@ -6,13 +6,15 @@
#include "base/logging.h"
#include "content/common/gpu/gpu_memory_buffer_factory_x11_pixmap.h"
+#include "gpu/command_buffer/service/image_factory.h"
#include "ui/gl/gl_image.h"
#include "ui/gl/gl_image_shared_memory.h"
namespace content {
namespace {
-class GpuMemoryBufferFactoryImpl : public GpuMemoryBufferFactory {
+class GpuMemoryBufferFactoryImpl : public GpuMemoryBufferFactory,
+ public gpu::ImageFactory {
public:
// Overridden from GpuMemoryBufferFactory:
virtual gfx::GpuMemoryBufferHandle CreateGpuMemoryBuffer(
@@ -41,6 +43,9 @@ class GpuMemoryBufferFactoryImpl : public GpuMemoryBufferFactory {
break;
}
}
+ virtual gpu::ImageFactory* AsImageFactory() override { return this; }
+
+ // Overridden from gpu::GpuMemoryBufferFactory:
virtual scoped_refptr<gfx::GLImage> CreateImageForGpuMemoryBuffer(
const gfx::GpuMemoryBufferHandle& handle,
const gfx::Size& size,
« no previous file with comments | « content/common/gpu/gpu_memory_buffer_factory_win.cc ('k') | gpu/command_buffer/service/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698