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

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

Issue 10103021: aura/texture transport: Keep ref to texture infos to avoid races with the UI (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address review comments 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 | « content/common/gpu/texture_image_transport_surface.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 42b80f3591eac9105688a4c96fddf251babedb34..68b844fa8fbf13b603af893936d8fe7c9e7d94c6 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -2991,15 +2991,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();
@@ -6148,10 +6154,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 | « content/common/gpu/texture_image_transport_surface.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698