| 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 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 2061 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2072 context_provider, | 2072 context_provider, |
| 2073 resource_provider_.get(), | 2073 resource_provider_.get(), |
| 2074 GetMaxTransferBufferUsageBytes(context_provider->ContextCapabilities(), | 2074 GetMaxTransferBufferUsageBytes(context_provider->ContextCapabilities(), |
| 2075 settings_.refresh_rate)); | 2075 settings_.refresh_rate)); |
| 2076 } | 2076 } |
| 2077 | 2077 |
| 2078 tile_manager_ = TileManager::Create(this, | 2078 tile_manager_ = TileManager::Create(this, |
| 2079 task_runner, | 2079 task_runner, |
| 2080 resource_pool_.get(), | 2080 resource_pool_.get(), |
| 2081 raster_worker_pool_->AsRasterizer(), | 2081 raster_worker_pool_->AsRasterizer(), |
| 2082 rendering_stats_instrumentation_); | 2082 rendering_stats_instrumentation_, |
| 2083 settings().scheduled_raster_task_limit); |
| 2083 | 2084 |
| 2084 UpdateTileManagerMemoryPolicy(ActualManagedMemoryPolicy()); | 2085 UpdateTileManagerMemoryPolicy(ActualManagedMemoryPolicy()); |
| 2085 need_to_update_visible_tiles_before_draw_ = false; | 2086 need_to_update_visible_tiles_before_draw_ = false; |
| 2086 } | 2087 } |
| 2087 | 2088 |
| 2088 void LayerTreeHostImpl::DestroyTileManager() { | 2089 void LayerTreeHostImpl::DestroyTileManager() { |
| 2089 tile_manager_ = nullptr; | 2090 tile_manager_ = nullptr; |
| 2090 resource_pool_ = nullptr; | 2091 resource_pool_ = nullptr; |
| 2091 staging_resource_pool_ = nullptr; | 2092 staging_resource_pool_ = nullptr; |
| 2092 raster_worker_pool_ = nullptr; | 2093 raster_worker_pool_ = nullptr; |
| (...skipping 1384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3477 } | 3478 } |
| 3478 | 3479 |
| 3479 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { | 3480 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { |
| 3480 std::vector<PictureLayerImpl*>::iterator it = | 3481 std::vector<PictureLayerImpl*>::iterator it = |
| 3481 std::find(picture_layers_.begin(), picture_layers_.end(), layer); | 3482 std::find(picture_layers_.begin(), picture_layers_.end(), layer); |
| 3482 DCHECK(it != picture_layers_.end()); | 3483 DCHECK(it != picture_layers_.end()); |
| 3483 picture_layers_.erase(it); | 3484 picture_layers_.erase(it); |
| 3484 } | 3485 } |
| 3485 | 3486 |
| 3486 } // namespace cc | 3487 } // namespace cc |
| OLD | NEW |