diff options
author | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-12 02:16:48 +0000 |
---|---|---|
committer | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-12 02:16:48 +0000 |
commit | 11ac265bc51ee941cfc1db30ff9517226a8cb187 (patch) | |
tree | 0c4016504dd10a5647a826674fc965ecb78aa0bb /content | |
parent | 41be2a18edb301bfe536b6de74e1e0f556037bd1 (diff) | |
download | chromium_src-11ac265bc51ee941cfc1db30ff9517226a8cb187.zip chromium_src-11ac265bc51ee941cfc1db30ff9517226a8cb187.tar.gz chromium_src-11ac265bc51ee941cfc1db30ff9517226a8cb187.tar.bz2 |
ContextProvider::BindToCurrentThread should fail consistently.
BindToCurrentThread() should not return true if makeContextCurrent() fails.
If makeContextCurrent() fails, then the context will not have a valid
GLES2Implementation or GLES2CmdHelper. So make sure BindToCurrentThread()
always returns false in this situation.
Currently, the second time the function is called it will return true no
matter what, which is awful.
R=piman
BUG=181636
Review URL: https://codereview.chromium.org/12667020
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@187456 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r-- | content/common/gpu/client/context_provider_command_buffer.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/content/common/gpu/client/context_provider_command_buffer.cc b/content/common/gpu/client/context_provider_command_buffer.cc index e97c082..2796007 100644 --- a/content/common/gpu/client/context_provider_command_buffer.cc +++ b/content/common/gpu/client/context_provider_command_buffer.cc @@ -71,9 +71,11 @@ bool ContextProviderCommandBuffer::BindToCurrentThread() { if (lost_context_callback_proxy_) return true; - bool result = context3d_->makeContextCurrent(); + if (!context3d_->makeContextCurrent()) + return false; + lost_context_callback_proxy_.reset(new LostContextCallbackProxy(this)); - return result; + return true; } WebGraphicsContext3DCommandBufferImpl* |