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

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

Issue 1084173004: Adding status to swap complete (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: set SWAP_RESULT_LAST properly Created 5 years, 7 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
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 861fc4a42633459fcf3bc6265e12aab416f979be..57c94f37f8c8286fc9520df53802db1b3af4ec1a 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -8223,7 +8223,8 @@ error::Error GLES2DecoderImpl::HandlePostSubBufferCHROMIUM(
gpu_state_tracer_->TakeSnapshotWithCurrentFramebuffer(
is_offscreen ? offscreen_size_ : surface_->GetSize());
}
- if (surface_->PostSubBuffer(c.x, c.y, c.width, c.height)) {
+ if (surface_->PostSubBuffer(c.x, c.y, c.width, c.height) !=
+ gfx::SwapResult::SWAP_FAILED) {
return error::kNoError;
} else {
LOG(ERROR) << "Context lost because PostSubBuffer failed.";
@@ -10360,7 +10361,7 @@ void GLES2DecoderImpl::DoSwapBuffers() {
glFlush();
}
} else {
- if (!surface_->SwapBuffers()) {
+ if (surface_->SwapBuffers() == gfx::SwapResult::SWAP_FAILED) {
LOG(ERROR) << "Context lost because SwapBuffers failed.";
LoseContext(GL_UNKNOWN_CONTEXT_RESET_ARB);
}

Powered by Google App Engine
This is Rietveld 408576698