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

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: Rebased again. Created 8 years, 1 month 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
« no previous file with comments | « ui/gl/generate_bindings.py ('k') | ui/gl/gl_surface.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gl_surface.h
diff --git a/ui/gl/gl_surface.h b/ui/gl/gl_surface.h
index 4ecc47223a38f9f642cd81e0aea2ab74614e029f..56d8ae7a126015b3ecba46466c7c87afcc578dc2 100644
--- a/ui/gl/gl_surface.h
+++ b/ui/gl/gl_surface.h
@@ -13,6 +13,11 @@
#include "ui/gfx/size.h"
#include "ui/gl/gl_export.h"
+namespace base {
+class TimeDelta;
+class TimeTicks;
+}
+
namespace gfx {
class GLContext;
@@ -102,6 +107,12 @@ class GL_EXPORT GLSurface : public base::RefCounted<GLSurface> {
// Get the GL pixel format of the surface, if available.
virtual unsigned GetFormat();
+ // Get the time of the most recent screen refresh, along with the time
+ // between consecutive refreshes. Returns false when these values are
+ // unavailable.
+ virtual bool GetVSyncParameters(base::TimeTicks* timebase,
+ base::TimeDelta* interval);
+
// Create a GL surface that renders directly to a view.
static scoped_refptr<GLSurface> CreateViewGLSurface(
bool software,
@@ -153,6 +164,8 @@ class GL_EXPORT GLSurfaceAdapter : public GLSurface {
virtual void* GetDisplay() OVERRIDE;
virtual void* GetConfig() OVERRIDE;
virtual unsigned GetFormat() OVERRIDE;
+ virtual bool GetVSyncParameters(base::TimeTicks* timebase,
+ base::TimeDelta* interval) OVERRIDE;
GLSurface* surface() const { return surface_.get(); }
« no previous file with comments | « ui/gl/generate_bindings.py ('k') | ui/gl/gl_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698