summaryrefslogtreecommitdiffstats
path: root/gpu/command_buffer
diff options
context:
space:
mode:
authorapatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-10 18:02:02 +0000
committerapatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-10 18:02:02 +0000
commit5259ead872da61f51c2e528755c140b5661553cb (patch)
tree595121dd45f7ebbcd04fa79e2c888a8fa9d82e7c /gpu/command_buffer
parent6049ef9eb7322b0051b8358b48f5a665ef022331 (diff)
downloadchromium_src-5259ead872da61f51c2e528755c140b5661553cb.zip
chromium_src-5259ead872da61f51c2e528755c140b5661553cb.tar.gz
chromium_src-5259ead872da61f51c2e528755c140b5661553cb.tar.bz2
GPU process reports context lost when SwapBuffers fails.
This is to give the renderer or plugin process an opportunity to recover. TEST=try BUG=none Review URL: http://codereview.chromium.org/3305028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59115 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu/command_buffer')
-rw-r--r--gpu/command_buffer/service/gles2_cmd_decoder.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
index f13fc47..a6d3d8f 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -5332,7 +5332,8 @@ error::Error GLES2DecoderImpl::HandleSwapBuffers(
glFlush();
}
} else {
- context_->SwapBuffers();
+ if (!context_->SwapBuffers())
+ return error::kLostContext;
}
// TODO(kbr): when the back buffer is multisampled, then at least on Mac