| 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;
|
| }
|
|
|