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

Unified Diff: ui/gl/gl_surface_egl.cc

Issue 13886018: Add a factory and defines for native Linux surfaces. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: vsync provider, better transport_dib, etc. Created 7 years, 7 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_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_)) {

Powered by Google App Engine
This is Rietveld 408576698