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

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

Issue 2673473002: Rename SwapBuffersWithDamage to SwapBuffersWithBounds (Closed)
Patch Set: fix windows compile warning Created 3 years, 10 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_passthrough_doers.cc
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_doers.cc b/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_doers.cc
index cac909c99cc0da7560e2340690a27a80f11f65b3..db92cb4dda07bee3497fdbda38c24f1fed4cc801 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_doers.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_doers.cc
@@ -2667,14 +2667,17 @@ error::Error GLES2DecoderPassthroughImpl::DoGetTranslatedShaderSourceANGLE(
return error::kNoError;
}
-error::Error GLES2DecoderPassthroughImpl::DoSwapBuffersWithDamageCHROMIUM(
- GLint x,
- GLint y,
- GLint width,
- GLint height) {
- gfx::SwapResult result = surface_->PostSubBuffer(x, y, width, height);
+error::Error GLES2DecoderPassthroughImpl::DoSwapBuffersWithBoundsCHROMIUM(
+ GLsizei count,
+ const volatile GLint* rects) {
+ std::vector<gfx::Rect> bounds(count);
+ for (GLsizei i = 0; i < count; ++i) {
+ bounds[i] = gfx::Rect(rects[i * 4 + 0], rects[i * 4 + 1], rects[i * 4 + 2],
+ rects[i * 4 + 3]);
+ }
+ gfx::SwapResult result = surface_->SwapBuffersWithBounds(bounds);
if (result == gfx::SwapResult::SWAP_FAILED) {
- LOG(ERROR) << "Context lost because PostSubBuffer failed.";
+ LOG(ERROR) << "Context lost because SwapBuffersWithBounds failed.";
}
// TODO(geofflang): force the context loss?
return error::kNoError;

Powered by Google App Engine
This is Rietveld 408576698