diff options
author | epenner@chromium.org <epenner@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-24 11:27:20 +0000 |
---|---|---|
committer | epenner@chromium.org <epenner@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-24 11:27:20 +0000 |
commit | 56e339903d45562fc840f993eceab296066c3fb6 (patch) | |
tree | 4f2bd4c2e57419a71bcf919f1b34a71e831463ee /ui | |
parent | 0a059925c7dad5dddc9b1d486bbc0a645c214d00 (diff) | |
download | chromium_src-56e339903d45562fc840f993eceab296066c3fb6.zip chromium_src-56e339903d45562fc840f993eceab296066c3fb6.tar.gz chromium_src-56e339903d45562fc840f993eceab296066c3fb6.tar.bz2 |
gpu: Fix gl call that can happen with no context.
We have an FBO unbind work around, but if it happens
after ReleaseCurrent, it will make a GL call with no context.
Review URL: https://chromiumcodereview.appspot.com/15981002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@202059 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui')
-rw-r--r-- | ui/gl/gl_context_egl.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ui/gl/gl_context_egl.cc b/ui/gl/gl_context_egl.cc index 9ab9695..ee815bf 100644 --- a/ui/gl/gl_context_egl.cc +++ b/ui/gl/gl_context_egl.cc @@ -98,8 +98,10 @@ bool GLContextEGL::MakeCurrent(GLSurface* surface) { "context", context_, "surface", surface); - if (unbind_fbo_on_makecurrent_) + if (unbind_fbo_on_makecurrent_ && + eglGetCurrentContext() != EGL_NO_CONTEXT) { glBindFramebufferEXT(GL_FRAMEBUFFER, 0); + } if (!eglMakeCurrent(display_, surface->GetHandle(), |