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

Unified Diff: ui/gl/gl_context_egl.cc

Issue 693943003: Update from https://crrev.com/302630 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 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/gl.gyp ('k') | ui/gl/gl_image_glx.h » ('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 2554f8c5b1d029277e541ab78a2f1ed1680a94b1..733ad8d85a2cced84f93a6492f8fdafe3b2a67bf 100644
--- a/ui/gl/gl_context_egl.cc
+++ b/ui/gl/gl_context_egl.cc
@@ -173,7 +173,13 @@ void* GLContextEGL::GetHandle() {
}
void GLContextEGL::SetSwapInterval(int interval) {
- DCHECK(IsCurrent(NULL));
+ DCHECK(IsCurrent(NULL) && GLSurface::GetCurrent());
+
+ // This is a surfaceless context. eglSwapInterval doesn't take any effect in
+ // this case and will just return EGL_BAD_SURFACE.
+ if (GLSurface::GetCurrent()->IsSurfaceless())
+ return;
+
if (!eglSwapInterval(display_, interval)) {
LOG(ERROR) << "eglSwapInterval failed with error "
<< GetLastEGLErrorString();
« no previous file with comments | « ui/gl/gl.gyp ('k') | ui/gl/gl_image_glx.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698