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

Unified Diff: gpu/command_buffer/service/gles2_cmd_decoder_passthrough_handlers_autogen.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_handlers_autogen.cc
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_handlers_autogen.cc b/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_handlers_autogen.cc
index 9fbbcf2aa56dd383aada0209939c0c5626e77c82..b5369631afd08c556075110865d1b38ad366da77 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_handlers_autogen.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_handlers_autogen.cc
@@ -4156,5 +4156,31 @@ error::Error GLES2DecoderPassthroughImpl::HandleOverlayPromotionHintCHROMIUM(
return error::kNoError;
}
+error::Error
+GLES2DecoderPassthroughImpl::HandleSwapBuffersWithBoundsCHROMIUMImmediate(
+ uint32_t immediate_data_size,
+ const volatile void* cmd_data) {
+ const volatile gles2::cmds::SwapBuffersWithBoundsCHROMIUMImmediate& c =
+ *static_cast<
+ const volatile gles2::cmds::SwapBuffersWithBoundsCHROMIUMImmediate*>(
+ cmd_data);
+ GLsizei count = static_cast<GLsizei>(c.count);
+ uint32_t data_size = 0;
+ if (count >= 0 &&
+ !GLES2Util::ComputeDataSize(count, sizeof(GLint), 4, &data_size)) {
+ return error::kOutOfBounds;
+ }
+ if (data_size > immediate_data_size) {
+ return error::kOutOfBounds;
+ }
+ volatile const GLint* rects = GetImmediateDataAs<volatile const GLint*>(
+ c, data_size, immediate_data_size);
+ error::Error error = DoSwapBuffersWithBoundsCHROMIUM(count, rects);
+ if (error != error::kNoError) {
+ return error;
+ }
+ return error::kNoError;
+}
+
} // namespace gles2
} // namespace gpu

Powered by Google App Engine
This is Rietveld 408576698