Commit 779233fe authored by sunnyps's avatar sunnyps Committed by Commit bot

cc: Do not synchronize on deletion of non-internal resources.

Resources which do not belong to a particular ResourceProvider should
not require a WaitSyncToken. This is a speculative fix for the increased
idle wakeups seen on Mac non-overlay.

R=piman@chromium.org
BUG=621198
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel

Review-Url: https://codereview.chromium.org/2130213002
Cr-Commit-Position: refs/heads/master@{#404461}
parent 32ab6660
......@@ -703,7 +703,8 @@ void ResourceProvider::DeleteResourceInternal(ResourceMap::iterator it,
bool lost_resource =
resource->lost || exported_resource_lost || gpu_resource_lost;
if (!lost_resource &&
// Wait on sync token before deleting resources we own.
if (!lost_resource && resource->origin == Resource::INTERNAL &&
resource->synchronization_state() == Resource::NEEDS_WAIT) {
DCHECK(resource->allocated);
DCHECK(IsGpuResourceType(resource->type));
......@@ -744,6 +745,7 @@ void ResourceProvider::DeleteResourceInternal(ResourceMap::iterator it,
GLES2Interface* gl = ContextGL();
DCHECK(gl);
if (resource->gl_id) {
DCHECK_NE(Resource::NEEDS_WAIT, resource->synchronization_state());
gl->DeleteTextures(1, &resource->gl_id);
resource->gl_id = 0;
if (!lost_resource) {
......
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