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

Unified Diff: ui/gl/gl_surface_egl.cc

Issue 22277004: Add gfx::SurfaceFactoryWebview (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: implementation Created 7 years, 4 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
« ui/gl/gl.gyp ('K') | « ui/gl/gl.gyp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gl_surface_egl.cc
diff --git a/ui/gl/gl_surface_egl.cc b/ui/gl/gl_surface_egl.cc
index 8c29342ab408e2f0e10fb0ff370807d449c5646c..9fe06ff6809216f10f77c42ae66185c3c1f38123 100644
--- a/ui/gl/gl_surface_egl.cc
+++ b/ui/gl/gl_surface_egl.cc
@@ -25,6 +25,10 @@
#include "ui/gl/gl_switches.h"
#include "ui/gl/scoped_make_current.h"
+#if defined(OS_ANDROID)
+#include "ui/gl/android/surface_factory_webview.h"
+#endif
+
#if defined(USE_X11)
extern "C" {
#include <X11/Xlib.h>
@@ -647,7 +651,15 @@ GLSurface::CreateViewGLSurface(gfx::AcceleratedWidget window) {
if(surface->Initialize(sync_provider))
return surface;
} else {
- scoped_refptr<GLSurface> surface = new GLSurfaceStub();
+ scoped_refptr<GLSurface> surface;
+
+#if defined(OS_ANDROID)
+ if (SurfaceFactoryWebView* factory = SurfaceFactoryWebView::GetInstance())
+ surface = factory->CreateNonOwnedViewSurface();
+#endif
+
+ if (!surface)
+ surface = new GLSurfaceStub();
if (surface->Initialize())
return surface;
}
« ui/gl/gl.gyp ('K') | « ui/gl/gl.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698