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

Unified Diff: ui/gl/gl_surface.h

Issue 11195011: Send vsync timebase updates to the browser compositor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use the existing output surface mechanism to feed vsync info into the 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
Index: ui/gl/gl_surface.h
diff --git a/ui/gl/gl_surface.h b/ui/gl/gl_surface.h
index 4ecc47223a38f9f642cd81e0aea2ab74614e029f..2ccaa721efe81f614704250eb67addd3f5e54c6f 100644
--- a/ui/gl/gl_surface.h
+++ b/ui/gl/gl_surface.h
@@ -102,6 +102,14 @@ class GL_EXPORT GLSurface : public base::RefCounted<GLSurface> {
// Get the GL pixel format of the surface, if available.
virtual unsigned GetFormat();
+ // Get the CLOCK_MONOTONIC time (in microseconds) for the most recent screen
piman 2012/10/24 16:56:54 CLOCK_MONOTONIC is a linux-only concept. Maybe the
ajuma 2012/10/26 20:12:39 Done.
+ // refresh, along with the values of the Media Stream Counter (which counts
+ // screen refreshes) and the Swap Buffer Counter. Returns false on error,
+ // including when these values are unavailable.
+ virtual bool GetSyncValues(int64* monotonicTime,
piman 2012/10/24 16:56:54 nit: chrome style for parameters
ajuma 2012/10/26 20:12:39 Done.
+ int64* mediaStreamCounter,
+ int64* swapBufferCounter);
+
// Create a GL surface that renders directly to a view.
static scoped_refptr<GLSurface> CreateViewGLSurface(
bool software,
@@ -153,6 +161,9 @@ class GL_EXPORT GLSurfaceAdapter : public GLSurface {
virtual void* GetDisplay() OVERRIDE;
virtual void* GetConfig() OVERRIDE;
virtual unsigned GetFormat() OVERRIDE;
+ virtual bool GetSyncValues(int64* monotonicTime,
+ int64* mediaStreamCounter,
+ int64* swapBufferCounter) OVERRIDE;
GLSurface* surface() const { return surface_.get(); }

Powered by Google App Engine
This is Rietveld 408576698