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

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

Issue 2473973002: NOT for review (for discussion): Query IOSurfaceIsInUse in the browser process
Patch Set: Created 4 years, 1 month 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
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);
}
« no previous file with comments | « gpu/command_buffer/common/texture_in_use_response.h ('k') | gpu/ipc/client/gpu_memory_buffer_impl_io_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698