| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 2147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2158 output_surface_->worker_context_provider(), | 2158 output_surface_->worker_context_provider(), |
| 2159 settings_.renderer_settings.preferred_tile_format)); | 2159 settings_.renderer_settings.preferred_tile_format)); |
| 2160 } else { | 2160 } else { |
| 2161 image_decode_controller_ = | 2161 image_decode_controller_ = |
| 2162 base::WrapUnique(new SoftwareImageDecodeController( | 2162 base::WrapUnique(new SoftwareImageDecodeController( |
| 2163 settings_.renderer_settings.preferred_tile_format)); | 2163 settings_.renderer_settings.preferred_tile_format)); |
| 2164 } | 2164 } |
| 2165 | 2165 |
| 2166 // TODO(vmpstr): Initialize tile task limit at ctor time. | 2166 // TODO(vmpstr): Initialize tile task limit at ctor time. |
| 2167 tile_manager_->SetResources( | 2167 tile_manager_->SetResources( |
| 2168 resource_pool_.get(), tile_task_worker_pool_->AsTileTaskRunner(), | 2168 resource_pool_.get(), tile_task_worker_pool_.get(), |
| 2169 image_decode_controller_.get(), | 2169 image_decode_controller_.get(), |
| 2170 is_synchronous_single_threaded_ ? std::numeric_limits<size_t>::max() | 2170 is_synchronous_single_threaded_ ? std::numeric_limits<size_t>::max() |
| 2171 : settings_.scheduled_raster_task_limit, | 2171 : settings_.scheduled_raster_task_limit, |
| 2172 use_gpu_rasterization_); | 2172 use_gpu_rasterization_); |
| 2173 UpdateTileManagerMemoryPolicy(ActualManagedMemoryPolicy()); | 2173 UpdateTileManagerMemoryPolicy(ActualManagedMemoryPolicy()); |
| 2174 } | 2174 } |
| 2175 | 2175 |
| 2176 void LayerTreeHostImpl::CreateResourceAndTileTaskWorkerPool( | 2176 void LayerTreeHostImpl::CreateResourceAndTileTaskWorkerPool( |
| 2177 std::unique_ptr<TileTaskWorkerPool>* tile_task_worker_pool, | 2177 std::unique_ptr<TileTaskWorkerPool>* tile_task_worker_pool, |
| 2178 std::unique_ptr<ResourcePool>* resource_pool) { | 2178 std::unique_ptr<ResourcePool>* resource_pool) { |
| (...skipping 1801 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3980 return task_runner_provider_->HasImplThread(); | 3980 return task_runner_provider_->HasImplThread(); |
| 3981 } | 3981 } |
| 3982 | 3982 |
| 3983 bool LayerTreeHostImpl::CommitToActiveTree() const { | 3983 bool LayerTreeHostImpl::CommitToActiveTree() const { |
| 3984 // In single threaded mode we skip the pending tree and commit directly to the | 3984 // In single threaded mode we skip the pending tree and commit directly to the |
| 3985 // active tree. | 3985 // active tree. |
| 3986 return !task_runner_provider_->HasImplThread(); | 3986 return !task_runner_provider_->HasImplThread(); |
| 3987 } | 3987 } |
| 3988 | 3988 |
| 3989 } // namespace cc | 3989 } // namespace cc |
| OLD | NEW |