| Index: gpu/command_buffer/service/gles2_cmd_decoder.cc
|
| diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
|
| index 6ec2b0a83120dfc5c32b4ff9fbafabb0c820209d..7275d4f7783736f4db2588a9ecc5fb6f3068a5aa 100644
|
| --- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
|
| +++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
|
| @@ -1050,6 +1050,8 @@ class GLES2DecoderImpl : public GLES2Decoder, public ErrorStateClient {
|
|
|
| void DoMatrixLoadfCHROMIUM(GLenum matrix_mode, const GLfloat* matrix);
|
| void DoMatrixLoadIdentityCHROMIUM(GLenum matrix_mode);
|
| + void DoScheduleCALayerInUseQueryCHROMIUM(GLsizei count,
|
| + const GLuint* textures);
|
|
|
| // Creates a Program for the given program.
|
| Program* CreateProgram(GLuint client_id, GLuint service_id) {
|
| @@ -10448,6 +10450,35 @@ error::Error GLES2DecoderImpl::HandleScheduleCALayerCHROMIUM(
|
| return error::kNoError;
|
| }
|
|
|
| +void GLES2DecoderImpl::DoScheduleCALayerInUseQueryCHROMIUM(
|
| + GLsizei count,
|
| + const GLuint* textures) {
|
| + std::vector<gl::GLSurface::CALayerInUseQuery> queries;
|
| + queries.reserve(count);
|
| + for (GLsizei i = 0; i < count; ++i) {
|
| + gl::GLImage* image = nullptr;
|
| + GLuint texture_id = textures[i];
|
| + if (texture_id) {
|
| + TextureRef* ref = texture_manager()->GetTexture(texture_id);
|
| + if (!ref) {
|
| + LOCAL_SET_GL_ERROR(GL_INVALID_VALUE,
|
| + "glScheduleCALayerInUseQueryCHROMIUM",
|
| + "unknown texture");
|
| + return;
|
| + }
|
| + Texture::ImageState image_state;
|
| + image = ref->texture()->GetLevelImage(ref->texture()->target(), 0,
|
| + &image_state);
|
| + }
|
| + gl::GLSurface::CALayerInUseQuery query;
|
| + query.image = image;
|
| + query.texture = texture_id;
|
| + queries.push_back(query);
|
| + }
|
| +
|
| + surface_->ScheduleCALayerInUseQuery(std::move(queries));
|
| +}
|
| +
|
| error::Error GLES2DecoderImpl::GetAttribLocationHelper(
|
| GLuint client_id,
|
| uint32_t location_shm_id,
|
|
|