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

Unified Diff: ui/gl/gl_image_win.cc

Issue 20017005: gpu: Refactor GpuMemoryBuffer framework for multi-process support. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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
Index: ui/gl/gl_image_win.cc
diff --git a/ui/gl/gl_image_win.cc b/ui/gl/gl_image_win.cc
index 7698b8471a4472d80c4d08d81dba6b8ada31f64c..26b4a8f692074a3af357b5a3afffa2385f74c2d3 100644
--- a/ui/gl/gl_image_win.cc
+++ b/ui/gl/gl_image_win.cc
@@ -5,6 +5,7 @@
#include "ui/gl/gl_image.h"
#include "base/debug/trace_event.h"
+#include "ui/gl/gl_image_shm.h"
#include "ui/gl/gl_image_stub.h"
#include "ui/gl/gl_implementation.h"
@@ -32,7 +33,18 @@ scoped_refptr<GLImage> GLImage::CreateGLImageForGpuMemoryBuffer(
case kGLImplementationOSMesaGL:
case kGLImplementationDesktopGL:
case kGLImplementationEGLGLES2:
- return NULL;
+ switch (buffer.type) {
+ case SHARED_MEMORY_BUFFER: {
+ scoped_refptr<GLImageShm> image(new GLImageShm(size));
+ if (!image->Initialize(buffer))
+ return NULL;
+
+ return image;
+ }
+ default:
+ NOTREACHED();
+ return NULL;
+ }
case kGLImplementationMockGL:
return new GLImageStub;
default:
« ui/gfx/gpu_memory_buffer.h ('K') | « ui/gl/gl_image_shm.cc ('k') | ui/gl/gl_image_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698