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

Unified Diff: ui/gl/gl_context.h

Issue 789823004: Added ability to force a GLContext SwapInterval to zero. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.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 | « gpu/command_buffer/service/gl_context_virtual.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..c80a59931a88ee68058c9e2a1236290595faef12 100644
--- a/ui/gl/gl_context.h
+++ b/ui/gl/gl_context.h
@@ -76,7 +76,8 @@ 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);
+ void ForceSwapIntervalZero(bool force);
Ken Russell (switch to Gerrit) 2014/12/10 19:52:53 Please add a one-line comment about what the new f
// Returns space separated list of extensions. The context must be current.
virtual std::string GetExtensions();
@@ -169,6 +170,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 +185,9 @@ class GL_EXPORT GLContext : public base::RefCounted<GLContext> {
std::vector<scoped_refptr<FlushEvent> > flush_events_;
+ int swap_interval;
Zhenyao Mo 2014/12/10 01:02:00 end with a "_".
+ bool force_swap_interval_zero;
Zhenyao Mo 2014/12/10 01:02:00 end with a "_".
+
DISALLOW_COPY_AND_ASSIGN(GLContext);
};
« no previous file with comments | « gpu/command_buffer/service/gl_context_virtual.cc ('k') | ui/gl/gl_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698