| Index: gpu/command_buffer/service/gles2_cmd_decoder.cc
|
| diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
|
| index 0886768193444d6e61c7467c5ef30e28aeaf85a6..58aca229ecc49fdc7063d5ee03a71d9573eec36e 100644
|
| --- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
|
| +++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
|
| @@ -3628,6 +3628,13 @@ void GLES2DecoderImpl::Destroy(bool have_context) {
|
|
|
| DCHECK(!have_context || context_->IsCurrent(NULL));
|
|
|
| + if (vertex_array_manager_ .get()) {
|
| + // Destroy needs to be called before the VertexAttribManagers are destroyed
|
| + // so that they know the context is no longer available and do not attempts
|
| + // to call gl* functions.
|
| + vertex_array_manager_->Destroy(have_context);
|
| + }
|
| +
|
| // Unbind everything.
|
| state_.vertex_attrib_manager = NULL;
|
| state_.default_vertex_attrib_manager = NULL;
|
| @@ -3727,7 +3734,6 @@ void GLES2DecoderImpl::Destroy(bool have_context) {
|
| }
|
|
|
| if (vertex_array_manager_ .get()) {
|
| - vertex_array_manager_->Destroy(have_context);
|
| vertex_array_manager_.reset();
|
| }
|
|
|
| @@ -3952,7 +3958,6 @@ error::Error GLES2DecoderImpl::HandleResizeCHROMIUM(uint32 immediate_data_size,
|
|
|
| if (!resize_callback_.is_null()) {
|
| resize_callback_.Run(gfx::Size(width, height), scale_factor);
|
| - DCHECK(context_->IsCurrent(surface_.get()));
|
| if (!context_->IsCurrent(surface_.get())) {
|
| LOG(ERROR) << "GLES2DecoderImpl: Context lost because context no longer "
|
| << "current after resize callback.";
|
|
|