| 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();
|
|
|