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

Unified Diff: ui/gl/gl_gl_api_implementation.cc

Issue 15928002: GPU: Keep track of the last real context and real surface made current. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Make GetRealCurrent protected. 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
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 94166eed457f039623a47d1f85329b871cd61ba0..746993d93bbd1782da0d78f8cb70c773150f5f09 100644
--- a/ui/gl/gl_gl_api_implementation.cc
+++ b/ui/gl/gl_gl_api_implementation.cc
@@ -268,8 +268,9 @@ bool VirtualGLApi::MakeCurrent(GLContext* virtual_context, GLSurface* surface) {
}
}
- DCHECK(GLSurface::GetCurrent());
- DCHECK(real_context_->IsCurrent(GLSurface::GetCurrent()));
+ DCHECK_EQ(real_context_, GLContext::GetRealCurrent());
+ DCHECK(GLSurface::GetRealCurrent());
+ DCHECK(real_context_->IsCurrent(GLSurface::GetRealCurrent()));
DCHECK(virtual_context->IsCurrent(surface));
if (switched_contexts || virtual_context != current_context_) {
@@ -290,6 +291,7 @@ bool VirtualGLApi::MakeCurrent(GLContext* virtual_context, GLSurface* surface) {
SetGLApi(temp);
}
SetGLApi(this);
+
return true;
}
« ui/gl/gl_context.cc ('K') | « ui/gl/gl_context_wgl.cc ('k') | ui/gl/gl_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698