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

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

Issue 2067503003: Add a new command buffer function glScheduleCALayerInUseQueryCHROMIUM. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Minor fix. Created 4 years, 6 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.cc
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_handlers.cc b/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_handlers.cc
index 9fc9bc4121712dd32b6732414c453f38534d10fc..dd4d7b4d16e3b007d81843d337035dd9b8f7c3e1 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_handlers.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_handlers.cc
@@ -1941,6 +1941,28 @@ error::Error GLES2DecoderPassthroughImpl::HandleScheduleCALayerCHROMIUM(
return error::kNoError;
}
+error::Error
+GLES2DecoderPassthroughImpl::HandleScheduleCALayerInUseQueryCHROMIUMImmediate(
+ uint32_t immediate_data_size,
+ const void* cmd_data) {
+ const gles2::cmds::ScheduleCALayerInUseQueryCHROMIUMImmediate& c =
+ *static_cast<
+ const gles2::cmds::ScheduleCALayerInUseQueryCHROMIUMImmediate*>(
+ cmd_data);
+
+ GLuint n = static_cast<GLuint>(c.n);
+ uint32_t data_size;
+ if (!GLES2Util::ComputeDataSize(n, sizeof(GLuint), 1, &data_size)) {
+ return error::kOutOfBounds;
+ }
+ if (data_size > immediate_data_size) {
+ return error::kOutOfBounds;
+ }
+ const GLuint* textures =
+ GetImmediateDataAs<const GLuint*>(c, data_size, immediate_data_size);
+ return DoScheduleCALayerInUseQueryCHROMIUM(n, textures);
+}
+
error::Error GLES2DecoderPassthroughImpl::HandleGenPathsCHROMIUM(
uint32_t immediate_data_size,
const void* cmd_data) {

Powered by Google App Engine
This is Rietveld 408576698