| Index: gpu/command_buffer/client/gles2_implementation.cc
|
| diff --git a/gpu/command_buffer/client/gles2_implementation.cc b/gpu/command_buffer/client/gles2_implementation.cc
|
| index 8b272ded6592b8d749c78945809964b34fe39c6a..a309b2583b49e628b53435f803adac15354a1bd7 100644
|
| --- a/gpu/command_buffer/client/gles2_implementation.cc
|
| +++ b/gpu/command_buffer/client/gles2_implementation.cc
|
| @@ -4985,6 +4985,47 @@ void GLES2Implementation::ScheduleCALayerCHROMIUM(GLuint contents_texture_id,
|
| buffer.offset());
|
| }
|
|
|
| +void GLES2Implementation::ScheduleDCLayerSharedStateCHROMIUM(
|
| + GLfloat opacity,
|
| + GLboolean is_clipped,
|
| + const GLfloat* clip_rect,
|
| + GLint z_order,
|
| + const GLfloat* transform) {
|
| + size_t shm_size = 20 * sizeof(GLfloat);
|
| + ScopedTransferBufferPtr buffer(shm_size, helper_, transfer_buffer_);
|
| + if (!buffer.valid() || buffer.size() < shm_size) {
|
| + SetGLError(GL_OUT_OF_MEMORY, "GLES2::ScheduleDCLayerSharedStateCHROMIUM",
|
| + "out of memory");
|
| + return;
|
| + }
|
| + GLfloat* mem = static_cast<GLfloat*>(buffer.address());
|
| + memcpy(mem + 0, clip_rect, 4 * sizeof(GLfloat));
|
| + memcpy(mem + 4, transform, 16 * sizeof(GLfloat));
|
| + helper_->ScheduleDCLayerSharedStateCHROMIUM(opacity, is_clipped, z_order,
|
| + buffer.shm_id(), buffer.offset());
|
| +}
|
| +
|
| +void GLES2Implementation::ScheduleDCLayerCHROMIUM(GLuint contents_texture_id,
|
| + const GLfloat* contents_rect,
|
| + GLuint background_color,
|
| + GLuint edge_aa_mask,
|
| + const GLfloat* bounds_rect,
|
| + GLuint filter) {
|
| + size_t shm_size = 8 * sizeof(GLfloat);
|
| + ScopedTransferBufferPtr buffer(shm_size, helper_, transfer_buffer_);
|
| + if (!buffer.valid() || buffer.size() < shm_size) {
|
| + SetGLError(GL_OUT_OF_MEMORY, "GLES2::ScheduleDCLayerCHROMIUM",
|
| + "out of memory");
|
| + return;
|
| + }
|
| + GLfloat* mem = static_cast<GLfloat*>(buffer.address());
|
| + memcpy(mem + 0, contents_rect, 4 * sizeof(GLfloat));
|
| + memcpy(mem + 4, bounds_rect, 4 * sizeof(GLfloat));
|
| + helper_->ScheduleDCLayerCHROMIUM(contents_texture_id, background_color,
|
| + edge_aa_mask, filter, buffer.shm_id(),
|
| + buffer.offset());
|
| +}
|
| +
|
| void GLES2Implementation::CommitOverlayPlanesCHROMIUM() {
|
| GPU_CLIENT_SINGLE_THREAD_CHECK();
|
| GPU_CLIENT_LOG("[" << GetLogPrefix() << "] CommitOverlayPlanesCHROMIUM()");
|
|
|