| 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 2139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2150 } | 2150 } |
| 2151 | 2151 |
| 2152 void LayerTreeHostImpl::CreateTileManagerResources() { | 2152 void LayerTreeHostImpl::CreateTileManagerResources() { |
| 2153 std::unique_ptr<RasterBufferProvider> raster_buffer_provider; | 2153 std::unique_ptr<RasterBufferProvider> raster_buffer_provider; |
| 2154 CreateResourceAndRasterBufferProvider(&raster_buffer_provider, | 2154 CreateResourceAndRasterBufferProvider(&raster_buffer_provider, |
| 2155 &resource_pool_); | 2155 &resource_pool_); |
| 2156 | 2156 |
| 2157 if (use_gpu_rasterization_) { | 2157 if (use_gpu_rasterization_) { |
| 2158 image_decode_controller_ = base::WrapUnique(new GpuImageDecodeController( | 2158 image_decode_controller_ = base::WrapUnique(new GpuImageDecodeController( |
| 2159 output_surface_->worker_context_provider(), | 2159 output_surface_->worker_context_provider(), |
| 2160 settings_.renderer_settings.preferred_tile_format)); | 2160 settings_.renderer_settings.preferred_tile_format, |
| 2161 settings_.gpu_decoded_image_budget_bytes)); |
| 2161 } else { | 2162 } else { |
| 2162 image_decode_controller_ = | 2163 image_decode_controller_ = |
| 2163 base::WrapUnique(new SoftwareImageDecodeController( | 2164 base::WrapUnique(new SoftwareImageDecodeController( |
| 2164 settings_.renderer_settings.preferred_tile_format)); | 2165 settings_.renderer_settings.preferred_tile_format, |
| 2166 settings_.software_decoded_image_budget_bytes)); |
| 2165 } | 2167 } |
| 2166 | 2168 |
| 2167 // Pass the single-threaded synchronous task graph runner to the worker pool | 2169 // Pass the single-threaded synchronous task graph runner to the worker pool |
| 2168 // if we're in synchronous single-threaded mode. | 2170 // if we're in synchronous single-threaded mode. |
| 2169 TaskGraphRunner* task_graph_runner = task_graph_runner_; | 2171 TaskGraphRunner* task_graph_runner = task_graph_runner_; |
| 2170 if (is_synchronous_single_threaded_) { | 2172 if (is_synchronous_single_threaded_) { |
| 2171 DCHECK(!single_thread_synchronous_task_graph_runner_); | 2173 DCHECK(!single_thread_synchronous_task_graph_runner_); |
| 2172 single_thread_synchronous_task_graph_runner_.reset( | 2174 single_thread_synchronous_task_graph_runner_.reset( |
| 2173 new SynchronousTaskGraphRunner); | 2175 new SynchronousTaskGraphRunner); |
| 2174 task_graph_runner = single_thread_synchronous_task_graph_runner_.get(); | 2176 task_graph_runner = single_thread_synchronous_task_graph_runner_.get(); |
| (...skipping 1829 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4004 const { | 4006 const { |
| 4005 return fixed_raster_scale_attempted_scale_change_history_.count() >= | 4007 return fixed_raster_scale_attempted_scale_change_history_.count() >= |
| 4006 kFixedRasterScaleAttemptedScaleChangeThreshold; | 4008 kFixedRasterScaleAttemptedScaleChangeThreshold; |
| 4007 } | 4009 } |
| 4008 | 4010 |
| 4009 void LayerTreeHostImpl::SetFixedRasterScaleAttemptedToChangeScale() { | 4011 void LayerTreeHostImpl::SetFixedRasterScaleAttemptedToChangeScale() { |
| 4010 fixed_raster_scale_attempted_scale_change_history_.set(0); | 4012 fixed_raster_scale_attempted_scale_change_history_.set(0); |
| 4011 } | 4013 } |
| 4012 | 4014 |
| 4013 } // namespace cc | 4015 } // namespace cc |
| OLD | NEW |