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

Unified Diff: ui/gl/gl_gl_api_implementation.cc

Issue 15841002: gpu: Fix corrupted state due to virtual MakeCurrent race. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reland patch. Created 7 years, 7 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
« no previous file with comments | « gpu/command_buffer/service/gl_state_restorer_impl.cc ('k') | ui/gl/gl_state_restorer.h » ('j') | 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 1002dbd278842f0e51a8868f58b1bea16bf5f5fe..a8f671e911f1da1c4ad14223da1840e4286dc948 100644
--- a/ui/gl/gl_gl_api_implementation.cc
+++ b/ui/gl/gl_gl_api_implementation.cc
@@ -285,7 +285,8 @@ bool VirtualGLApi::MakeCurrent(GLContext* virtual_context, GLSurface* surface) {
// needed for individual GL calls.
GLApi* temp = GetCurrentGLApi();
SetGLToRealGLApi();
- virtual_context->GetGLStateRestorer()->RestoreState();
+ if (virtual_context->GetGLStateRestorer()->IsInitialized())
+ virtual_context->GetGLStateRestorer()->RestoreState();
SetGLApi(temp);
}
SetGLApi(this);
« no previous file with comments | « gpu/command_buffer/service/gl_state_restorer_impl.cc ('k') | ui/gl/gl_state_restorer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698