Chromium Code Reviews| Index: cc/resources/resource_provider.h |
| diff --git a/cc/resources/resource_provider.h b/cc/resources/resource_provider.h |
| index df3c5b85fb6bf1fa476f80761982df271ce19fa2..53096457c85d2b556e61e823e35378bb5c3f7e34 100644 |
| --- a/cc/resources/resource_provider.h |
| +++ b/cc/resources/resource_provider.h |
| @@ -524,6 +524,11 @@ class CC_EXPORT ResourceProvider |
| GLenum GetImageTextureTarget(gfx::BufferUsage usage, ResourceFormat format); |
| + // Sets whether or not to store resources that are being returned to |
| + // children to return them all at once. Setting this to false will return |
| + // all accumulated resources. |
| + void SetBatchReturnResources(bool aggregate); |
| + |
| // base::trace_event::MemoryDumpProvider implementation. |
| bool OnMemoryDump(const base::trace_event::MemoryDumpArgs& args, |
| base::trace_event::ProcessMemoryDump* pmd) override; |
| @@ -774,6 +779,12 @@ class CC_EXPORT ResourceProvider |
| std::unique_ptr<TextureIdAllocator> texture_id_allocator_; |
| BufferToTextureTargetMap buffer_to_texture_target_map_; |
| + // Keep track of whether deleted resources should be batched up or returned |
| + // immediately. |
| + bool batch_return_resources_ = false; |
| + // Maps from a child id to the set of resources to be returned to it. |
| + std::map<int, ResourceIdArray> batched_returning_resources_; |
|
Daniele Castagna
2017/03/24 01:44:43
How many child ids do you expect to have?
Should w
|
| + |
| base::ThreadChecker thread_checker_; |
| // A process-unique ID used for disambiguating memory dumps from different |