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

Unified Diff: ui/gl/gl_context_egl.cc

Issue 839143002: Roll Chrome into Mojo. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Rebase Created 5 years, 11 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
« no previous file with comments | « ui/gl/gl_context_egl.h ('k') | ui/gl/gl_context_osmesa.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gl_context_egl.cc
diff --git a/ui/gl/gl_context_egl.cc b/ui/gl/gl_context_egl.cc
index 5dd1aaf58ce88ceed3c1a0ef61c2a8116f6488c9..076de98635788463d1bbf08f9bd6a8596cc65449 100644
--- a/ui/gl/gl_context_egl.cc
+++ b/ui/gl/gl_context_egl.cc
@@ -29,7 +29,8 @@ GLContextEGL::GLContextEGL(GLShareGroup* share_group)
context_(NULL),
display_(NULL),
config_(NULL),
- unbind_fbo_on_makecurrent_(false) {
+ unbind_fbo_on_makecurrent_(false),
+ swap_interval_(1) {
}
bool GLContextEGL::Initialize(
@@ -125,6 +126,8 @@ bool GLContextEGL::MakeCurrent(GLSurface* surface) {
return false;
}
+ surface->OnSetSwapInterval(swap_interval_);
+
release_current.Cancel();
return true;
}
@@ -183,6 +186,9 @@ void GLContextEGL::OnSetSwapInterval(int interval) {
if (!eglSwapInterval(display_, interval)) {
LOG(ERROR) << "eglSwapInterval failed with error "
<< GetLastEGLErrorString();
+ } else {
+ swap_interval_ = interval;
+ GLSurface::GetCurrent()->OnSetSwapInterval(interval);
}
}
« no previous file with comments | « ui/gl/gl_context_egl.h ('k') | ui/gl/gl_context_osmesa.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698