| OLD | NEW |
| 1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "cc/trees/layer_tree_host_impl.h" | 5 #include "cc/trees/layer_tree_host_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <limits> | 8 #include <limits> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 2132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2143 } | 2143 } |
| 2144 | 2144 |
| 2145 void LayerTreeHostImpl::CleanUpTileManager() { | 2145 void LayerTreeHostImpl::CleanUpTileManager() { |
| 2146 tile_manager_->FinishTasksAndCleanUp(); | 2146 tile_manager_->FinishTasksAndCleanUp(); |
| 2147 resource_pool_ = nullptr; | 2147 resource_pool_ = nullptr; |
| 2148 tile_task_worker_pool_ = nullptr; | 2148 tile_task_worker_pool_ = nullptr; |
| 2149 single_thread_synchronous_task_graph_runner_ = nullptr; | 2149 single_thread_synchronous_task_graph_runner_ = nullptr; |
| 2150 } | 2150 } |
| 2151 | 2151 |
| 2152 scoped_ptr<OutputSurface> LayerTreeHostImpl::ReleaseOutputSurface() { | 2152 scoped_ptr<OutputSurface> LayerTreeHostImpl::ReleaseOutputSurface() { |
| 2153 TRACE_EVENT0("cc", "LayerTreeHostImpl::ReleaseOutputSurface"); |
| 2154 |
| 2153 // Since we will create a new resource provider, we cannot continue to use | 2155 // Since we will create a new resource provider, we cannot continue to use |
| 2154 // the old resources (i.e. render_surfaces and texture IDs). Clear them | 2156 // the old resources (i.e. render_surfaces and texture IDs). Clear them |
| 2155 // before we destroy the old resource provider. | 2157 // before we destroy the old resource provider. |
| 2156 ReleaseTreeResources(); | 2158 ReleaseTreeResources(); |
| 2157 | 2159 |
| 2158 // Note: order is important here. | 2160 // Note: order is important here. |
| 2159 renderer_ = nullptr; | 2161 renderer_ = nullptr; |
| 2160 CleanUpTileManager(); | 2162 CleanUpTileManager(); |
| 2161 resource_provider_ = nullptr; | 2163 resource_provider_ = nullptr; |
| 2162 | 2164 |
| (...skipping 1435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3598 if (active_tree()) { | 3600 if (active_tree()) { |
| 3599 LayerAnimationValueProvider* layer = active_tree()->LayerById(layer_id); | 3601 LayerAnimationValueProvider* layer = active_tree()->LayerById(layer_id); |
| 3600 if (layer) | 3602 if (layer) |
| 3601 return layer->ScrollOffsetForAnimation(); | 3603 return layer->ScrollOffsetForAnimation(); |
| 3602 } | 3604 } |
| 3603 | 3605 |
| 3604 return gfx::ScrollOffset(); | 3606 return gfx::ScrollOffset(); |
| 3605 } | 3607 } |
| 3606 | 3608 |
| 3607 } // namespace cc | 3609 } // namespace cc |
| OLD | NEW |