Index: ui/gl/gl_surface_egl.cc |
diff --git a/ui/gl/gl_surface_egl.cc b/ui/gl/gl_surface_egl.cc |
index ae22a28419c53ef447145b2dc161cb699de5010c..a087b7c4b32f3f763c80e6d81afd33cebeddb5ce 100644 |
--- a/ui/gl/gl_surface_egl.cc |
+++ b/ui/gl/gl_surface_egl.cc |
@@ -146,7 +146,8 @@ bool GLSurfaceEGL::InitializeOneOff() { |
initialized = true; |
-#if defined(USE_X11) || defined(OS_ANDROID) |
+#if defined(USE_X11) || defined(OS_ANDROID) \ |
+ || defined(USE_OZONE) |
return true; |
#else |
g_software_native_display = EGL_SOFTWARE_DISPLAY_ANGLE; |
@@ -214,6 +215,10 @@ bool GLSurfaceEGL::IsCreateContextRobustnessSupported() { |
return g_egl_create_context_robustness_supported; |
} |
+bool GLSurfaceEGL::IsSyncControlSupported() { |
+ return g_egl_sync_control_supported; |
+} |
+ |
GLSurfaceEGL::~GLSurfaceEGL() {} |
NativeViewGLSurfaceEGL::NativeViewGLSurfaceEGL(bool software, |
@@ -272,10 +277,16 @@ bool NativeViewGLSurfaceEGL::Initialize() { |
if (g_egl_sync_control_supported) |
vsync_provider_.reset(new EGLSyncControlVSyncProvider(surface_)); |
- |
return true; |
} |
+bool NativeViewGLSurfaceEGL::Initialize(VSyncProvider* syncProvider) { |
+ bool retval = Initialize(); |
+ if (retval) |
+ vsync_provider_.reset(syncProvider); |
+ return retval; |
+} |
+ |
void NativeViewGLSurfaceEGL::Destroy() { |
if (surface_) { |
if (!eglDestroySurface(GetDisplay(), surface_)) { |