Chromium Code Reviews| Index: cc/trees/layer_tree_host_impl.cc |
| diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc |
| index fa8c22011a956aa42425af3584f333fbd3a5bb0f..e350764ed66b0287be3c827ca32a12971f15555d 100644 |
| --- a/cc/trees/layer_tree_host_impl.cc |
| +++ b/cc/trees/layer_tree_host_impl.cc |
| @@ -1327,6 +1327,17 @@ void LayerTreeHostImpl::NotifyTileStateChanged(const Tile* tile) { |
| void LayerTreeHostImpl::SetMemoryPolicy(const ManagedMemoryPolicy& policy) { |
| SetManagedMemoryPolicy(policy); |
| + |
| + // This is short term solution to synchronously drop tile resources when |
| + // using synchronous compositing to avoid memory usage regression. |
| + // crbug.com/499004 to track removing this. |
| + if (!policy.bytes_limit_when_visible && tile_manager_ && |
| + settings_.using_synchronous_renderer_compositor) { |
| + ReleaseTreeResources(); |
| + DestroyTileManager(); |
|
vmpstr
2015/06/10 23:15:54
Can you make a comment that explains that destruct
boliu
2015/06/10 23:20:56
Done
|
| + CreateAndSetTileManager(); |
| + RecreateTreeResources(); |
| + } |
| } |
| void LayerTreeHostImpl::SetTreeActivationCallback( |