diff options
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, 4 insertions, 1 deletions
diff --git a/gpu/command_buffer/service/gl_context_virtual.cc b/gpu/command_buffer/service/gl_context_virtual.cc index d0602b2..793bfa6 100644 --- a/gpu/command_buffer/service/gl_context_virtual.cc +++ b/gpu/command_buffer/service/gl_context_virtual.cc @@ -52,9 +52,12 @@ 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 + else if (!IsCurrent(surface)) shared_context_->MakeCurrent(surface); return true; } |