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

Unified Diff: ui/gl/gl_context_nsview.mm

Issue 221433004: gpu: Bind dummy GL API when no context is current (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix two gpu unittests Created 6 years, 9 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 | « ui/gl/gl_context_glx.cc ('k') | ui/gl/gl_context_osmesa.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gl_context_nsview.mm
diff --git a/ui/gl/gl_context_nsview.mm b/ui/gl/gl_context_nsview.mm
index 8f38d08166d0a1fa8b08b08e9367456362f588cf..bc4a87b910bcb277c3429cf1de309106d5e21c53 100644
--- a/ui/gl/gl_context_nsview.mm
+++ b/ui/gl/gl_context_nsview.mm
@@ -55,6 +55,7 @@ void GLContextNSView::Destroy() {
}
bool GLContextNSView::MakeCurrent(GLSurface* surface) {
+ ScopedReleaseCurrent release_current;
TRACE_EVENT0("gpu", "GLContextNSView::MakeCurrent");
AcceleratedWidget view =
static_cast<AcceleratedWidget>(surface->GetHandle());
@@ -67,7 +68,6 @@ bool GLContextNSView::MakeCurrent(GLSurface* surface) {
SetRealGLApi();
SetCurrent(surface);
if (!InitializeDynamicBindings()) {
- ReleaseCurrent(surface);
return false;
}
@@ -76,6 +76,7 @@ bool GLContextNSView::MakeCurrent(GLSurface* surface) {
return false;
}
+ release_current.Cancel();
return true;
}
« no previous file with comments | « ui/gl/gl_context_glx.cc ('k') | ui/gl/gl_context_osmesa.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698