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 2127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2138 client_->UpdateRendererCapabilitiesOnImplThread(); | 2138 client_->UpdateRendererCapabilitiesOnImplThread(); |
2139 } | 2139 } |
2140 | 2140 |
2141 void LayerTreeHostImpl::CreateTileManagerResources() { | 2141 void LayerTreeHostImpl::CreateTileManagerResources() { |
2142 CreateResourceAndTileTaskWorkerPool(&tile_task_worker_pool_, &resource_pool_); | 2142 CreateResourceAndTileTaskWorkerPool(&tile_task_worker_pool_, &resource_pool_); |
2143 | 2143 |
2144 if (use_gpu_rasterization_) { | 2144 if (use_gpu_rasterization_) { |
2145 image_decode_controller_ = make_scoped_ptr(new GpuImageDecodeController); | 2145 image_decode_controller_ = make_scoped_ptr(new GpuImageDecodeController); |
2146 } else { | 2146 } else { |
2147 image_decode_controller_ = | 2147 image_decode_controller_ = |
2148 make_scoped_ptr(new SoftwareImageDecodeController); | 2148 make_scoped_ptr(new SoftwareImageDecodeController( |
2149 settings_.renderer_settings.preferred_tile_format)); | |
reveman
2016/03/16 14:53:35
What if preferred_tile_format is a compressed form
bashi
2016/03/17 01:52:14
I didn't notice that. Done.
| |
2149 } | 2150 } |
2150 | 2151 |
2151 // TODO(vmpstr): Initialize tile task limit at ctor time. | 2152 // TODO(vmpstr): Initialize tile task limit at ctor time. |
2152 tile_manager_->SetResources( | 2153 tile_manager_->SetResources( |
2153 resource_pool_.get(), tile_task_worker_pool_->AsTileTaskRunner(), | 2154 resource_pool_.get(), tile_task_worker_pool_->AsTileTaskRunner(), |
2154 image_decode_controller_.get(), | 2155 image_decode_controller_.get(), |
2155 is_synchronous_single_threaded_ ? std::numeric_limits<size_t>::max() | 2156 is_synchronous_single_threaded_ ? std::numeric_limits<size_t>::max() |
2156 : settings_.scheduled_raster_task_limit, | 2157 : settings_.scheduled_raster_task_limit, |
2157 use_gpu_rasterization_); | 2158 use_gpu_rasterization_); |
2158 UpdateTileManagerMemoryPolicy(ActualManagedMemoryPolicy()); | 2159 UpdateTileManagerMemoryPolicy(ActualManagedMemoryPolicy()); |
(...skipping 1758 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3917 return task_runner_provider_->HasImplThread(); | 3918 return task_runner_provider_->HasImplThread(); |
3918 } | 3919 } |
3919 | 3920 |
3920 bool LayerTreeHostImpl::CommitToActiveTree() const { | 3921 bool LayerTreeHostImpl::CommitToActiveTree() const { |
3921 // In single threaded mode we skip the pending tree and commit directly to the | 3922 // In single threaded mode we skip the pending tree and commit directly to the |
3922 // active tree. | 3923 // active tree. |
3923 return !task_runner_provider_->HasImplThread(); | 3924 return !task_runner_provider_->HasImplThread(); |
3924 } | 3925 } |
3925 | 3926 |
3926 } // namespace cc | 3927 } // namespace cc |
OLD | NEW |