diff options
author | bulach@chromium.org <bulach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-09 12:28:12 +0000 |
---|---|---|
committer | bulach@chromium.org <bulach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-09 12:28:12 +0000 |
commit | 7a2b783085c914a75c2bdfe99d6de5b535372092 (patch) | |
tree | 5d5c569c7658385de170b0f9123b228e7004d6b0 /gpu/command_buffer/service/gl_context_virtual.cc | |
parent | 0c4068529661b75c5b8582bf11dfd42695fe465a (diff) | |
download | chromium_src-7a2b783085c914a75c2bdfe99d6de5b535372092.zip chromium_src-7a2b783085c914a75c2bdfe99d6de5b535372092.tar.gz chromium_src-7a2b783085c914a75c2bdfe99d6de5b535372092.tar.bz2 |
Revert r198983, "gpu: Remove redundant MakeCurrent in GLContextVirtual::MakeCurrent"
Original: https://chromiumcodereview.appspot.com/14611013
Previously I misunderstood why we check if the decoder_ exists.
Only if it exists can we restore the state. If the decoder
doesn't exist and the context is already current,
we can just do nothing.
BUG=179250, 229643, 230896, 239403
TBR=epenner@chromium.org, sievers@chromium.org, gman@chromium.org
NOTRY=True
Review URL: https://chromiumcodereview.appspot.com/14752011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@199188 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.cc | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/gpu/command_buffer/service/gl_context_virtual.cc b/gpu/command_buffer/service/gl_context_virtual.cc index 793bfa6..d0602b2 100644 --- a/gpu/command_buffer/service/gl_context_virtual.cc +++ b/gpu/command_buffer/service/gl_context_virtual.cc @@ -52,12 +52,9 @@ void GLContextVirtual::Destroy() { } bool GLContextVirtual::MakeCurrent(gfx::GLSurface* surface) { - // If we have the decoder, we should restore state in - // MakeVirtuallyCurrent(). Otherwise just make the - // context/surface current (if needed). if (decoder_.get() && decoder_->initialized()) shared_context_->MakeVirtuallyCurrent(this, surface); - else if (!IsCurrent(surface)) + else shared_context_->MakeCurrent(surface); return true; } |