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

Unified Diff: ui/gl/gl_gl_api_implementation.cc

Issue 1241433003: Rebind EGL context to flush driver caches. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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
« gpu/command_buffer/service/gles2_cmd_decoder.cc ('K') | « ui/gl/gl_context_egl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gl_gl_api_implementation.cc
diff --git a/ui/gl/gl_gl_api_implementation.cc b/ui/gl/gl_gl_api_implementation.cc
index 1d6fcb15d0a57485bd0c12bc5618f53d1d85ed04..1a0d7b78dbe935d6fc8a3a0e397d5a2d580db612 100644
--- a/ui/gl/gl_gl_api_implementation.cc
+++ b/ui/gl/gl_gl_api_implementation.cc
@@ -540,7 +540,7 @@ bool VirtualGLApi::MakeCurrent(GLContext* virtual_context, GLSurface* surface) {
// MakeCurrent 'lite' path that avoids potentially expensive MakeCurrent()
// calls if the GLSurface uses the same underlying surface or renders to
// an FBO.
- if (switched_contexts || !current_surface ||
+ if (switched_contexts || !current_surface || !surface ||
ericrk 2015/07/13 21:15:33 This is a bit weird as IsCurrent(surface) always r
!virtual_context->IsCurrent(surface)) {
if (!real_context_->MakeCurrent(surface)) {
return false;
@@ -581,7 +581,7 @@ bool VirtualGLApi::MakeCurrent(GLContext* virtual_context, GLSurface* surface) {
SetGLApi(this);
virtual_context->SetCurrent(surface);
- if (!surface->OnMakeCurrent(virtual_context)) {
+ if (surface && !surface->OnMakeCurrent(virtual_context)) {
LOG(ERROR) << "Could not make GLSurface current.";
return false;
}
« gpu/command_buffer/service/gles2_cmd_decoder.cc ('K') | « ui/gl/gl_context_egl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698