From 5259ead872da61f51c2e528755c140b5661553cb Mon Sep 17 00:00:00 2001 From: "apatrick@chromium.org" Date: Fri, 10 Sep 2010 18:02:02 +0000 Subject: 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 --- gpu/command_buffer/service/gles2_cmd_decoder.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gpu') 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 -- cgit v1.1