Chromium Code Reviews| Index: cc/resources/resource_provider.cc |
| diff --git a/cc/resources/resource_provider.cc b/cc/resources/resource_provider.cc |
| index 55dafbd47d20e36196a8924b800c97cbbc9191db..869e118b88ac26ce07b43ab55c37a7948bf26b6f 100644 |
| --- a/cc/resources/resource_provider.cc |
| +++ b/cc/resources/resource_provider.cc |
| @@ -1453,6 +1453,10 @@ void ResourceProvider::DeclareUsedResourcesFromChild( |
| it != child_info.child_to_parent_map.end(); |
| ++it) { |
| ResourceId local_id = it->second; |
| + // Hold onto resources that still have read locks on them. |
| + if (GetResource(local_id)->lock_for_read_count > 0) |
| + child_info.in_use_resources.insert(local_id); |
|
piman
2014/03/27 00:12:37
I'm not sure if it's the best way to do this, in p
|
| + |
| bool resource_is_in_use = child_info.in_use_resources.count(local_id) > 0; |
| if (!resource_is_in_use) |
| unused.push_back(local_id); |