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

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

Issue 2163493002: Break glScheduleCALayerCHROMIUM into smaller functions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@temp37_cleanup_calayeroverlay
Patch Set: Comments from piman. Created 4 years, 5 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 | « gpu/command_buffer/service/gles2_cmd_decoder_passthrough_doers.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_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 ef2cff3771cde2780538224ebd8e8c53c0adb5e9..5a61daebd8b8c5b81a62cffe75dc0a87535f2237 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_handlers.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_handlers.cc
@@ -1726,30 +1726,49 @@ error::Error GLES2DecoderPassthroughImpl::HandleScheduleOverlayPlaneCHROMIUM(
return error::kNoError;
}
+error::Error
+GLES2DecoderPassthroughImpl::HandleScheduleCALayerSharedStateCHROMIUM(
+ uint32_t immediate_data_size,
+ const void* cmd_data) {
+ const gles2::cmds::ScheduleCALayerSharedStateCHROMIUM& c =
+ *static_cast<const gles2::cmds::ScheduleCALayerSharedStateCHROMIUM*>(
+ cmd_data);
+ const GLfloat* mem = GetSharedMemoryAs<const GLfloat*>(c.shm_id, c.shm_offset,
+ 20 * sizeof(GLfloat));
+ if (!mem) {
+ return error::kOutOfBounds;
+ }
+ GLfloat opacity = static_cast<GLfloat>(c.opacity);
+ GLboolean is_clipped = static_cast<GLboolean>(c.is_clipped);
+ const GLfloat* clip_rect = mem + 0;
+ GLint sorting_context_id = static_cast<GLint>(c.sorting_context_id);
+ const GLfloat* transform = mem + 4;
+ error::Error error = DoScheduleCALayerSharedStateCHROMIUM(
+ opacity, is_clipped, clip_rect, sorting_context_id, transform);
+ if (error != error::kNoError) {
+ return error;
+ }
+ return error::kNoError;
+}
+
error::Error GLES2DecoderPassthroughImpl::HandleScheduleCALayerCHROMIUM(
uint32_t immediate_data_size,
const void* cmd_data) {
const gles2::cmds::ScheduleCALayerCHROMIUM& c =
*static_cast<const gles2::cmds::ScheduleCALayerCHROMIUM*>(cmd_data);
const GLfloat* mem = GetSharedMemoryAs<const GLfloat*>(c.shm_id, c.shm_offset,
- 28 * sizeof(GLfloat));
+ 8 * sizeof(GLfloat));
if (!mem) {
return error::kOutOfBounds;
}
GLuint contents_texture_id = static_cast<GLint>(c.contents_texture_id);
const GLfloat* contents_rect = mem;
- GLfloat opacity = static_cast<GLfloat>(c.opacity);
GLuint background_color = static_cast<GLuint>(c.background_color);
GLuint edge_aa_mask = static_cast<GLuint>(c.edge_aa_mask);
const GLfloat* bounds_rect = mem + 4;
- GLboolean is_clipped = static_cast<GLboolean>(c.is_clipped);
- const GLfloat* clip_rect = mem + 8;
- GLint sorting_context_id = static_cast<GLint>(c.sorting_context_id);
- const GLfloat* transform = mem + 12;
- error::Error error = DoScheduleCALayerCHROMIUM(
- contents_texture_id, contents_rect, opacity, background_color,
- edge_aa_mask, bounds_rect, is_clipped, clip_rect, sorting_context_id,
- transform);
+ error::Error error =
+ DoScheduleCALayerCHROMIUM(contents_texture_id, contents_rect,
+ background_color, edge_aa_mask, bounds_rect);
if (error != error::kNoError) {
return error;
}
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder_passthrough_doers.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698