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

Unified Diff: cc/resources/resource_pool.cc

Issue 1298143003: Revert of Re-land: cc: Use worker context for one-copy tile initialization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 months 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
« no previous file with comments | « cc/resources/resource_pool.h ('k') | cc/resources/resource_pool_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/resource_pool.cc
diff --git a/cc/resources/resource_pool.cc b/cc/resources/resource_pool.cc
index e0e5af3703603e744775ab5e86afdf509a13198c..cdcaa4dbe47ad9d89c617f36eee7f5cbd3cb0ba5 100644
--- a/cc/resources/resource_pool.cc
+++ b/cc/resources/resource_pool.cc
@@ -191,11 +191,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);
« no previous file with comments | « cc/resources/resource_pool.h ('k') | cc/resources/resource_pool_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698