summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gpu/command_buffer/client/gles2_implementation.cc3
-rw-r--r--gpu/command_buffer/service/gles2_cmd_decoder.cc10
2 files changed, 9 insertions, 4 deletions
diff --git a/gpu/command_buffer/client/gles2_implementation.cc b/gpu/command_buffer/client/gles2_implementation.cc
index eece14d..956ac62 100644
--- a/gpu/command_buffer/client/gles2_implementation.cc
+++ b/gpu/command_buffer/client/gles2_implementation.cc
@@ -2486,9 +2486,6 @@ void GLES2Implementation::ResizeCHROMIUM(GLuint width, GLuint height) {
GPU_CLIENT_LOG("[" << this << "] glResizeCHROMIUM("
<< width << ", " << height << ")");
helper_->ResizeCHROMIUM(width, height);
- // This flush is a workaround for http://crbug.com/95492. We don't understand
- // the crash or why this fixes it.
- Flush();
}
const GLchar* GLES2Implementation::GetRequestableExtensionsCHROMIUM() {
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
index a92cb6e..465bff8 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -2552,8 +2552,16 @@ error::Error GLES2DecoderImpl::HandleResizeCHROMIUM(
return error::kLostContext;
}
- if (resize_callback_.get())
+ if (resize_callback_.get()) {
resize_callback_->Run(gfx::Size(width, height));
+#if defined(OS_MACOSX)
+ // On OSX, the resize callback clobbers the currently-active GL context.
+ // TODO(kbr): remove this MakeCurrent once the AcceleratedSurface code
+ // becomes able to restore its context.
+ if (!context_->MakeCurrent(surface_.get()))
+ return error::kLostContext;
+#endif
+ }
return error::kNoError;
}