diff options
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(); |