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

Unified Diff: ui/gl/gl_surface_glx.cc

Issue 11195011: Send vsync timebase updates to the browser compositor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Send vsync timebase updates to the browser compositor Created 8 years, 2 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
« content/common/gpu/image_transport_surface.cc ('K') | « ui/gl/gl_surface_glx.h ('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_glx.cc
diff --git a/ui/gl/gl_surface_glx.cc b/ui/gl/gl_surface_glx.cc
index 8428cfcf1ae940d4c68060a93c2d8c4a83850ac7..b8f45a535ef8da05ab319b4c762507cdc346951d 100644
--- a/ui/gl/gl_surface_glx.cc
+++ b/ui/gl/gl_surface_glx.cc
@@ -36,6 +36,7 @@ class ScopedPtrXFree {
Display* g_display;
const char* g_glx_extensions = NULL;
bool g_glx_create_context_robustness_supported = false;
+bool g_glx_oml_sync_control_supported = false;
} // namespace
@@ -67,6 +68,9 @@ bool GLSurfaceGLX::InitializeOneOff() {
g_glx_create_context_robustness_supported =
HasGLXExtension("GLX_ARB_create_context_robustness");
+ g_glx_oml_sync_control_supported =
+ HasGLXExtension("GLX_OML_sync_control");
+
initialized = true;
return true;
}
@@ -86,6 +90,11 @@ bool GLSurfaceGLX::IsCreateContextRobustnessSupported() {
return g_glx_create_context_robustness_supported;
}
+// static
+bool GLSurfaceGLX::IsOMLSyncControlSupported() {
+ return g_glx_oml_sync_control_supported;
+}
+
void* GLSurfaceGLX::GetDisplay() {
return g_display;
}
@@ -216,6 +225,17 @@ bool NativeViewGLSurfaceGLX::PostSubBuffer(
return true;
}
+bool NativeViewGLSurfaceGLX::GetSyncValues(int64_t* systemTime,
+ int64_t* mediaStreamCounter,
+ int64_t* swapBufferCounter) {
+ if (g_glx_oml_sync_control_supported) {
+ return glXGetSyncValuesOML(g_display, window_, systemTime,
+ mediaStreamCounter, swapBufferCounter);
+ }
+
+ return false;
+}
+
NativeViewGLSurfaceGLX::NativeViewGLSurfaceGLX()
: window_(0),
config_(NULL) {
« content/common/gpu/image_transport_surface.cc ('K') | « ui/gl/gl_surface_glx.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698