Index: cc/resources/resource_pool.cc |
diff --git a/cc/resources/resource_pool.cc b/cc/resources/resource_pool.cc |
index 115d58afe03094a91f4ddecdd4e6a533369d38e6..300c48f3d652a94458fa868f37c18da42995a933 100644 |
--- a/cc/resources/resource_pool.cc |
+++ b/cc/resources/resource_pool.cc |
@@ -138,11 +138,14 @@ |
delete resource; |
} |
-void ResourcePool::CheckBusyResources() { |
+void ResourcePool::CheckBusyResources(bool wait_if_needed) { |
ResourceList::iterator it = busy_resources_.begin(); |
while (it != busy_resources_.end()) { |
ScopedResource* resource = it->resource; |
+ |
+ if (wait_if_needed) |
+ resource_provider_->WaitReadLockIfNeeded(resource->id()); |
if (resource_provider_->CanLockForWrite(resource->id())) { |
DidFinishUsingResource(resource, it->content_id); |