diff options
author | ccameron@chromium.org <ccameron@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-03 18:50:06 +0000 |
---|---|---|
committer | ccameron@chromium.org <ccameron@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-03 18:50:06 +0000 |
commit | 55e136fcea039657a9fb9bd2847169233e67dba1 (patch) | |
tree | d7a679bae907b5439441a79a63bc51e3f4b76cb6 /gpu/command_buffer/service/gl_context_virtual.cc | |
parent | c183fb6f7fbb190d75ff6a5ff57c6cb445524145 (diff) | |
download | chromium_src-55e136fcea039657a9fb9bd2847169233e67dba1.zip chromium_src-55e136fcea039657a9fb9bd2847169233e67dba1.tar.gz chromium_src-55e136fcea039657a9fb9bd2847169233e67dba1.tar.bz2 |
Fix GL virtualization warnings on OS X
Stub out GetDisplay for GLSurfaceCGL so that the NOTIMPLEMENTED
in GLSurface is not hit.
Fix a bug where, when using context virtualization, a
GL_INVALD_FRAMEBUFFER_OPERATION is generated by
GLES2DecoderImpl::Initialize. This is a use-before-initialization bug
wherein GpuCommandBufferStub::Initialize calls MakeCurrent on
the virtual context, and because decoder_ is non-NULL in
GLContextVirtual::MakeCurrent, we try to restore the state
from the decoder (but decoder_ has not yet been initialized).
Remove extra logic to prevent calling Destroy on un-initialized
decoders, and add a check inside Destroy.
BUG=180463
Review URL: https://chromiumcodereview.appspot.com/13430019
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@192109 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 | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gpu/command_buffer/service/gl_context_virtual.cc b/gpu/command_buffer/service/gl_context_virtual.cc index 63550d6..5503a94 100644 --- a/gpu/command_buffer/service/gl_context_virtual.cc +++ b/gpu/command_buffer/service/gl_context_virtual.cc @@ -5,6 +5,7 @@ #include "gpu/command_buffer/service/gl_context_virtual.h" #include "gpu/command_buffer/service/gl_state_restorer_impl.h" +#include "gpu/command_buffer/service/gles2_cmd_decoder.h" #include "ui/gl/gl_surface.h" namespace gpu { @@ -44,7 +45,7 @@ void GLContextVirtual::Destroy() { } bool GLContextVirtual::MakeCurrent(gfx::GLSurface* surface) { - if (decoder_.get()) + if (decoder_.get() && decoder_->initialized()) shared_context_->MakeVirtuallyCurrent(this, surface); else shared_context_->MakeCurrent(surface); |