summaryrefslogtreecommitdiffstats
path: root/gpu/command_buffer/service/gl_context_virtual.cc
diff options
context:
space:
mode:
authorsievers@chromium.org <sievers@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-12 23:42:15 +0000
committersievers@chromium.org <sievers@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-12 23:42:15 +0000
commit746b28bb78b0f5390ff43f15b82b9145e1adb10c (patch)
treee82ca85b269ba6b20740bab853d8a2aa16d75729 /gpu/command_buffer/service/gl_context_virtual.cc
parentb8b51b5fd45e2fae0567e13da1a1655ab5a38a08 (diff)
downloadchromium_src-746b28bb78b0f5390ff43f15b82b9145e1adb10c.zip
chromium_src-746b28bb78b0f5390ff43f15b82b9145e1adb10c.tar.gz
chromium_src-746b28bb78b0f5390ff43f15b82b9145e1adb10c.tar.bz2
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 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@205970 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu/command_buffer/service/gl_context_virtual.cc')
-rw-r--r--gpu/command_buffer/service/gl_context_virtual.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/gpu/command_buffer/service/gl_context_virtual.cc b/gpu/command_buffer/service/gl_context_virtual.cc
index e7a4c04..dd32495 100644
--- a/gpu/command_buffer/service/gl_context_virtual.cc
+++ b/gpu/command_buffer/service/gl_context_virtual.cc
@@ -54,11 +54,14 @@ 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())
- 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) {