diff options
author | amarinichev@chromium.org <amarinichev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-13 17:57:54 +0000 |
---|---|---|
committer | amarinichev@chromium.org <amarinichev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-13 17:57:54 +0000 |
commit | 0fc357452454dbcf342314dfa828bdcb2dd560be (patch) | |
tree | 3975361c7255264d9a320e9c9eb04db3f67e2796 /gpu | |
parent | 1afd94be24f99ee691828772c02256bd1c9fdc87 (diff) | |
download | chromium_src-0fc357452454dbcf342314dfa828bdcb2dd560be.zip chromium_src-0fc357452454dbcf342314dfa828bdcb2dd560be.tar.gz chromium_src-0fc357452454dbcf342314dfa828bdcb2dd560be.tar.bz2 |
Adds GLContext::LosesAllContextsOnContextLost.
GLContext::LosesAllContextsOnContextLost specifies whether or not all contexts need to be destroyed when recovering from lost context condition. GpuCommandBufferStub::OnFlush and GpuCommandBufferStub::OnAsyncFlush will instruct soon-to-be-renamed GpuRenderThread to close all channels when the context is lost and LosesAllContextsOnContextLost returns true. From the EGL 1.4 spec:
"...On detection of this error, the application must destroy all contexts (by calling eglDestroyContext for each context). To continue rendering the application must recreate any contexts it requires, and subsequently restore any client API state and objects it wishes to use."
However even with this change Angle still doesn't recover correctly.
BUG=76753
TEST=breakpoint on eglDestroyContext
Review URL: http://codereview.chromium.org/6813010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81437 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu')
-rw-r--r-- | gpu/command_buffer/service/gles2_cmd_decoder.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc index 9702902..a1eab92 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc @@ -2516,9 +2516,6 @@ void GLES2DecoderImpl::Destroy() { // must release the ContextGroup before destroying the context as its // destructor uses GL. group_ = NULL; - - context_->Destroy(); - context_.reset(); } else { if (offscreen_target_frame_buffer_.get()) offscreen_target_frame_buffer_->Invalidate(); @@ -2536,6 +2533,10 @@ void GLES2DecoderImpl::Destroy() { offscreen_saved_color_texture_->Invalidate(); } + if (context_.get()) + context_->Destroy(); + context_.reset(); + offscreen_target_frame_buffer_.reset(); offscreen_target_color_texture_.reset(); offscreen_target_color_render_buffer_.reset(); |