Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(192)

Unified Diff: gpu/command_buffer/service/gles2_cmd_decoder.cc

Issue 10214014: Backport to R19 of r132638 r133017 r133579 r133732 (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1084/src
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/command_buffer/client/gles2_implementation.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 26c80f20f131a7315bd8ab6d504ab44329779c1f..3febcb4bd62424dec172c0de7a86c969c8a437ed 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -3095,15 +3095,21 @@ error::Error GLES2DecoderImpl::HandleResizeCHROMIUM(
#endif
bool is_offscreen = !!offscreen_target_frame_buffer_.get();
if (is_offscreen) {
- if (!ResizeOffscreenFrameBuffer(gfx::Size(width, height)))
+ if (!ResizeOffscreenFrameBuffer(gfx::Size(width, height))) {
+ LOG(ERROR) << "GLES2DecoderImpl: Context lost because "
+ << "ResizeOffscreenFrameBuffer failed.";
return error::kLostContext;
+ }
}
if (!resize_callback_.is_null()) {
resize_callback_.Run(gfx::Size(width, height));
DCHECK(context_->IsCurrent(surface_.get()));
- if (!context_->IsCurrent(surface_.get()))
+ if (!context_->IsCurrent(surface_.get())) {
+ LOG(ERROR) << "GLES2DecoderImpl: Context lost because context no longer "
+ << "current after resize callback.";
return error::kLostContext;
+ }
}
UpdateBackbufferMemoryAccounting();
@@ -6257,10 +6263,12 @@ error::Error GLES2DecoderImpl::HandlePostSubBufferCHROMIUM(
"glPostSubBufferCHROMIUM: command not supported by surface");
return error::kNoError;
}
- if (surface_->PostSubBuffer(c.x, c.y, c.width, c.height))
+ if (surface_->PostSubBuffer(c.x, c.y, c.width, c.height)) {
return error::kNoError;
- else
+ } else {
+ LOG(ERROR) << "Context lost because PostSubBuffer failed.";
return error::kLostContext;
+ }
}
error::Error GLES2DecoderImpl::GetAttribLocationHelper(
« no previous file with comments | « gpu/command_buffer/client/gles2_implementation.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698