From 194d5bbbddd285a1ae5cbab03ce8a01af96fb77d Mon Sep 17 00:00:00 2001 From: "sievers@chromium.org" Date: Thu, 13 Jun 2013 18:07:07 +0000 Subject: Revert 205970 "Revert 205481 "Virtual context MakeCurrent tweaks."" > Revert 205481 "Virtual context MakeCurrent tweaks." > > > Virtual context MakeCurrent tweaks. > > > > Do not allow GLContextVirtual::MakeCurrent() without a decoder (state > > restorer), since this only leads to state bugs. > > > > For this reason remove the necessity of having a current context during surface destruction (it's ugly anyway, since GLSurface is RefCounted). > > > > BUG=248395 > > > > Review URL: https://chromiumcodereview.appspot.com/15925007 > > TBR=sievers@chromium.org > > Review URL: https://codereview.chromium.org/16841006 TBR=sievers@chromium.org BUG=248957 Review URL: https://codereview.chromium.org/16988002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@206119 0039d316-1c4b-4281-b951-d872f2087c98 --- gpu/command_buffer/service/gl_context_virtual.cc | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'gpu') diff --git a/gpu/command_buffer/service/gl_context_virtual.cc b/gpu/command_buffer/service/gl_context_virtual.cc index dd32495..e7a4c04 100644 --- a/gpu/command_buffer/service/gl_context_virtual.cc +++ b/gpu/command_buffer/service/gl_context_virtual.cc @@ -54,14 +54,11 @@ void GLContextVirtual::Destroy() { } 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()) - shared_context_->MakeVirtuallyCurrent(this, surface); - else if (!IsCurrent(surface)) - shared_context_->MakeCurrent(surface); - return true; + return shared_context_->MakeVirtuallyCurrent(this, surface); + + LOG(ERROR) << "Trying to make virtual context current without decoder."; + return false; } void GLContextVirtual::ReleaseCurrent(gfx::GLSurface* surface) { -- cgit v1.1