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

Unified Diff: ui/gl/gl_context.h

Issue 812543002: Update from https://crrev.com/308331 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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/compositor/compositor.cc ('k') | ui/gl/gl_context.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gl_context.h
diff --git a/ui/gl/gl_context.h b/ui/gl/gl_context.h
index cdebd686b33eea7f994c4de880d57490cd14298d..62cabcd138b29c669701aa8010b9d6bb2e0a454f 100644
--- a/ui/gl/gl_context.h
+++ b/ui/gl/gl_context.h
@@ -76,7 +76,11 @@ class GL_EXPORT GLContext : public base::RefCounted<GLContext> {
void SetGLStateRestorer(GLStateRestorer* state_restorer);
// Set swap interval. This context must be current.
- virtual void SetSwapInterval(int interval) = 0;
+ void SetSwapInterval(int interval);
+
+ // Forces the swap interval to zero (no vsync) regardless of any future values
+ // passed to SetSwapInterval.
+ void ForceSwapIntervalZero(bool force);
// Returns space separated list of extensions. The context must be current.
virtual std::string GetExtensions();
@@ -169,6 +173,8 @@ class GL_EXPORT GLContext : public base::RefCounted<GLContext> {
// Returns the last real (non-virtual) GLContext made current.
static GLContext* GetRealCurrent();
+ virtual void OnSetSwapInterval(int interval) = 0;
+
private:
friend class base::RefCounted<GLContext>;
@@ -182,6 +188,9 @@ class GL_EXPORT GLContext : public base::RefCounted<GLContext> {
std::vector<scoped_refptr<FlushEvent> > flush_events_;
+ int swap_interval_;
+ bool force_swap_interval_zero_;
+
DISALLOW_COPY_AND_ASSIGN(GLContext);
};
« no previous file with comments | « ui/compositor/compositor.cc ('k') | ui/gl/gl_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698