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

Unified Diff: ui/gl/gl_context_egl.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
Index: ui/gl/gl_context_egl.cc
diff --git a/ui/gl/gl_context_egl.cc b/ui/gl/gl_context_egl.cc
index ed83b85ebd3cae5032592896753d9159a1435e55..6711eccb7fb99ec6e64224ca9cf17d7aeef4063a 100644
--- a/ui/gl/gl_context_egl.cc
+++ b/ui/gl/gl_context_egl.cc
@@ -98,6 +98,12 @@ void GLContextEGL::Destroy() {
bool GLContextEGL::MakeCurrent(GLSurface* surface) {
DCHECK(context_);
+
+ if (!surface) {
+ ReleaseCurrent(nullptr);
+ return true;
+ }
+
if (IsCurrent(surface))
return true;

Powered by Google App Engine
This is Rietveld 408576698