summaryrefslogtreecommitdiffstats
path: root/gpu
diff options
context:
space:
mode:
authornduca@chromium.org <nduca@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-09 05:24:05 +0000
committernduca@chromium.org <nduca@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-09 05:24:05 +0000
commit658f75667f50dbd7cdc0058a3f2de479eaaead51 (patch)
treef9c445d03d662e10c41b1d0da36b4baa8f04d2e0 /gpu
parent45ebc7e48e90f96bebe090864bf0ee64bd03b476 (diff)
downloadchromium_src-658f75667f50dbd7cdc0058a3f2de479eaaead51.zip
chromium_src-658f75667f50dbd7cdc0058a3f2de479eaaead51.tar.gz
chromium_src-658f75667f50dbd7cdc0058a3f2de479eaaead51.tar.bz2
A less-mysterious fix for b95492: Restore the GL context after resize.
BUG=95492 TEST=crash reports do not reappear in canary Review URL: http://codereview.chromium.org/7847016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100350 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu')
-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;
}