| 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 0fd09df41456da9a3e8128c7fc58df6ebbe2dbda..1a1fdadc839b76bc07a52ce918cb7ea918ea038a 100644
|
| --- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
|
| +++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
|
| @@ -1029,8 +1029,9 @@ class GLES2DecoderImpl : public GLES2Decoder, public ErrorStateClient {
|
| void DoMatrixLoadfCHROMIUM(GLenum matrix_mode,
|
| const volatile GLfloat* matrix);
|
| void DoMatrixLoadIdentityCHROMIUM(GLenum matrix_mode);
|
| - void DoScheduleCALayerInUseQueryCHROMIUM(GLsizei count,
|
| - const volatile GLuint* textures);
|
| + void DoScheduleCALayerInUseQueryCHROMIUM(
|
| + GLsizei count,
|
| + const volatile GLuint* textures_and_handle_requests);
|
|
|
| void DoFlushMappedBufferRange(
|
| GLenum target, GLintptr offset, GLsizeiptr size);
|
| @@ -11691,18 +11692,22 @@ error::Error GLES2DecoderImpl::HandleScheduleCALayerCHROMIUM(
|
|
|
| void GLES2DecoderImpl::DoScheduleCALayerInUseQueryCHROMIUM(
|
| GLsizei count,
|
| - const volatile GLuint* textures) {
|
| + const volatile GLuint* textures_and_handle_requests) {
|
| 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];
|
| + GLuint texture_id = textures_and_handle_requests[2 * i];
|
| + bool needs_handle = textures_and_handle_requests[2 * i + 1];
|
| if (texture_id) {
|
| TextureRef* ref = texture_manager()->GetTexture(texture_id);
|
| if (!ref) {
|
| LOCAL_SET_GL_ERROR(GL_INVALID_VALUE,
|
| "glScheduleCALayerInUseQueryCHROMIUM",
|
| "unknown texture");
|
| + // TODO(ccameron): If this hit, then our accounting in the
|
| + // browser process will be messed up. We should always add
|
| + // requested queries.
|
| return;
|
| }
|
| Texture::ImageState image_state;
|
| @@ -11712,6 +11717,7 @@ void GLES2DecoderImpl::DoScheduleCALayerInUseQueryCHROMIUM(
|
| gl::GLSurface::CALayerInUseQuery query;
|
| query.image = image;
|
| query.texture = texture_id;
|
| + query.needs_gpu_memory_buffer_handle = needs_handle;
|
| queries.push_back(query);
|
| }
|
|
|
|
|