Commit 99b95b83 authored by Sunny Sachanandani's avatar Sunny Sachanandani Committed by Commit Bot

cc: Remove unused async upload code from ResourceProvider.

This CL removes totally dead code.

R=jbauman
BUG=NONE

Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Id43675523896342b3a701655c81c1819edab4c8e
Reviewed-on: https://chromium-review.googlesource.com/598437Reviewed-by: default avatarJohn Bauman <jbauman@chromium.org>
Commit-Queue: Sunny Sachanandani <sunnyps@chromium.org>
Cr-Commit-Position: refs/heads/master@{#491826}
parent 483a4433
...@@ -191,9 +191,6 @@ ResourceProvider::Resource::Resource(GLuint texture_id, ...@@ -191,9 +191,6 @@ ResourceProvider::Resource::Resource(GLuint texture_id,
viz::ResourceFormat format) viz::ResourceFormat format)
: child_id(0), : child_id(0),
gl_id(texture_id), gl_id(texture_id),
gl_pixel_buffer_id(0),
gl_upload_query_id(0),
gl_read_lock_query_id(0),
pixels(nullptr), pixels(nullptr),
lock_for_read_count(0), lock_for_read_count(0),
imported_count(0), imported_count(0),
...@@ -233,9 +230,6 @@ ResourceProvider::Resource::Resource(uint8_t* pixels, ...@@ -233,9 +230,6 @@ ResourceProvider::Resource::Resource(uint8_t* pixels,
GLenum filter) GLenum filter)
: child_id(0), : child_id(0),
gl_id(0), gl_id(0),
gl_pixel_buffer_id(0),
gl_upload_query_id(0),
gl_read_lock_query_id(0),
pixels(pixels), pixels(pixels),
lock_for_read_count(0), lock_for_read_count(0),
imported_count(0), imported_count(0),
...@@ -276,9 +270,6 @@ ResourceProvider::Resource::Resource(const viz::SharedBitmapId& bitmap_id, ...@@ -276,9 +270,6 @@ ResourceProvider::Resource::Resource(const viz::SharedBitmapId& bitmap_id,
GLenum filter) GLenum filter)
: child_id(0), : child_id(0),
gl_id(0), gl_id(0),
gl_pixel_buffer_id(0),
gl_upload_query_id(0),
gl_read_lock_query_id(0),
pixels(nullptr), pixels(nullptr),
lock_for_read_count(0), lock_for_read_count(0),
imported_count(0), imported_count(0),
...@@ -774,24 +765,7 @@ void ResourceProvider::DeleteResourceInternal(ResourceMap::iterator it, ...@@ -774,24 +765,7 @@ void ResourceProvider::DeleteResourceInternal(ResourceMap::iterator it,
DCHECK(gl); DCHECK(gl);
gl->DestroyImageCHROMIUM(resource->image_id); gl->DestroyImageCHROMIUM(resource->image_id);
} }
if (resource->gl_upload_query_id) {
DCHECK(resource->origin == Resource::INTERNAL);
GLES2Interface* gl = ContextGL();
DCHECK(gl);
gl->DeleteQueriesEXT(1, &resource->gl_upload_query_id);
}
if (resource->gl_read_lock_query_id) {
DCHECK(resource->origin == Resource::INTERNAL);
GLES2Interface* gl = ContextGL();
DCHECK(gl);
gl->DeleteQueriesEXT(1, &resource->gl_read_lock_query_id);
}
if (resource->gl_pixel_buffer_id) {
DCHECK(resource->origin == Resource::INTERNAL);
GLES2Interface* gl = ContextGL();
DCHECK(gl);
gl->DeleteBuffers(1, &resource->gl_pixel_buffer_id);
}
if (resource->origin == Resource::EXTERNAL) { if (resource->origin == Resource::EXTERNAL) {
DCHECK(resource->mailbox().IsValid()); DCHECK(resource->mailbox().IsValid());
gpu::SyncToken sync_token = resource->mailbox().sync_token(); gpu::SyncToken sync_token = resource->mailbox().sync_token();
...@@ -817,6 +791,7 @@ void ResourceProvider::DeleteResourceInternal(ResourceMap::iterator it, ...@@ -817,6 +791,7 @@ void ResourceProvider::DeleteResourceInternal(ResourceMap::iterator it,
resource->release_callback_impl.Run(sync_token, lost_resource, resource->release_callback_impl.Run(sync_token, lost_resource,
blocking_main_thread_task_runner_); blocking_main_thread_task_runner_);
} }
if (resource->gl_id) { if (resource->gl_id) {
GLES2Interface* gl = ContextGL(); GLES2Interface* gl = ContextGL();
DCHECK(gl); DCHECK(gl);
......
...@@ -626,12 +626,6 @@ class CC_EXPORT ResourceProvider ...@@ -626,12 +626,6 @@ class CC_EXPORT ResourceProvider
int child_id; int child_id;
viz::ResourceId id_in_child; viz::ResourceId id_in_child;
unsigned gl_id; unsigned gl_id;
// Pixel buffer used for set pixels without unnecessary copying.
unsigned gl_pixel_buffer_id;
// Query used to determine when asynchronous set pixels complete.
unsigned gl_upload_query_id;
// Query used to determine when read lock fence has passed.
unsigned gl_read_lock_query_id;
ReleaseCallbackImpl release_callback_impl; ReleaseCallbackImpl release_callback_impl;
uint8_t* pixels; uint8_t* pixels;
int lock_for_read_count; int lock_for_read_count;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment