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

Unified Diff: ui/gl/gl_context.cc

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/gl/gl_context.h ('k') | ui/gl/gl_context_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gl_context.cc
diff --git a/ui/gl/gl_context.cc b/ui/gl/gl_context.cc
index e35806917f3e15cbc87f77124a8fa4c73d850e80..4cfcf735b2e6444f87c6cc5a8ac1444ab1bcd914 100644
--- a/ui/gl/gl_context.cc
+++ b/ui/gl/gl_context.cc
@@ -52,7 +52,10 @@ bool GLContext::FlushEvent::IsSignaled() {
return flag_.IsSet();
}
-GLContext::GLContext(GLShareGroup* share_group) : share_group_(share_group) {
+GLContext::GLContext(GLShareGroup* share_group) :
+ share_group_(share_group),
+ swap_interval_(1),
+ force_swap_interval_zero_(false) {
if (!share_group_.get())
share_group_ = new GLShareGroup;
@@ -178,6 +181,16 @@ void GLContext::SetGLStateRestorer(GLStateRestorer* state_restorer) {
state_restorer_ = make_scoped_ptr(state_restorer);
}
+void GLContext::SetSwapInterval(int interval) {
+ swap_interval_ = interval;
+ OnSetSwapInterval(force_swap_interval_zero_ ? 0 : swap_interval_);
+}
+
+void GLContext::ForceSwapIntervalZero(bool force) {
+ force_swap_interval_zero_ = force;
+ OnSetSwapInterval(force_swap_interval_zero_ ? 0 : swap_interval_);
+}
+
bool GLContext::WasAllocatedUsingRobustnessExtension() {
return false;
}
« no previous file with comments | « ui/gl/gl_context.h ('k') | ui/gl/gl_context_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698