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

Unified Diff: trunk/src/gpu/command_buffer/service/gl_context_virtual.cc

Issue 16841006: Revert 205481 "Virtual context MakeCurrent tweaks." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 6 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 | « trunk/src/content/common/gpu/image_transport_surface_mac.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/gpu/command_buffer/service/gl_context_virtual.cc
===================================================================
--- trunk/src/gpu/command_buffer/service/gl_context_virtual.cc (revision 205969)
+++ trunk/src/gpu/command_buffer/service/gl_context_virtual.cc (working copy)
@@ -54,11 +54,14 @@
}
bool GLContextVirtual::MakeCurrent(gfx::GLSurface* surface) {
+ // TODO(epenner): We should avoid bypassing MakeVirtuallyCurrent() below
+ // (return false or DCHECK when !decoder). To do this we must reorder
+ // tear-down in GpuCommandBufferStub::Destroy().
if (decoder_.get())
- return shared_context_->MakeVirtuallyCurrent(this, surface);
-
- LOG(ERROR) << "Trying to make virtual context current without decoder.";
- return false;
+ shared_context_->MakeVirtuallyCurrent(this, surface);
+ else if (!IsCurrent(surface))
+ shared_context_->MakeCurrent(surface);
+ return true;
}
void GLContextVirtual::ReleaseCurrent(gfx::GLSurface* surface) {
« no previous file with comments | « trunk/src/content/common/gpu/image_transport_surface_mac.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698