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

Unified Diff: ui/gl/gl_image_linux.cc

Issue 13543007: GLImage support for Android zero-copy pixel buffers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix minor indentation issue Created 7 years, 8 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_linux.cc
diff --git a/ui/gl/gl_image_linux.cc b/ui/gl/gl_image_linux.cc
index 75efd2ab2778aea26fd0af57cd1e88f99e6618ff..d9a463e5c21f2ebae54a036c7bd00d74e1b3103a 100644
--- a/ui/gl/gl_image_linux.cc
+++ b/ui/gl/gl_image_linux.cc
@@ -14,19 +14,32 @@ namespace gfx {
scoped_refptr<GLImage> GLImage::CreateGLImage(gfx::PluginWindowHandle window) {
TRACE_EVENT0("gpu", "GLImage::CreateGLImage");
switch (GetGLImplementation()) {
- case kGLImplementationOSMesaGL: {
+ case kGLImplementationOSMesaGL:
return NULL;
- }
- case kGLImplementationDesktopGL: {
+ case kGLImplementationDesktopGL:
scoped_refptr<GLImageGLX> image(new GLImageGLX(window));
if (!image->Initialize())
return NULL;
return image;
- }
- case kGLImplementationEGLGLES2: {
+ case kGLImplementationEGLGLES2:
+ return NULL;
+ case kGLImplementationMockGL:
+ return new GLImageStub;
+ default:
+ NOTREACHED();
+ return NULL;
+ }
+}
+
+scoped_refptr<GLImage> GLImage::CreateGLImageForGpuMemoryBuffer(
+ gfx::GpuMemoryBufferHandle buffer, const gfx::Size& size) {
+ TRACE_EVENT0("gpu", "GLImage::CreateGLImageForGpuMemoryBuffer");
+ switch (GetGLImplementation()) {
+ case kGLImplementationOSMesaGL:
+ case kGLImplementationDesktopGL:
+ case kGLImplementationEGLGLES2:
return NULL;
- }
case kGLImplementationMockGL:
return new GLImageStub;
default:
« ui/gl/gl_image_egl.cc ('K') | « ui/gl/gl_image_glx.cc ('k') | ui/gl/gl_image_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698