| 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 2156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2167 } | 2167 } |
| 2168 | 2168 |
| 2169 void LayerTreeHostImpl::CreateTileManagerResources() { | 2169 void LayerTreeHostImpl::CreateTileManagerResources() { |
| 2170 CreateResourceAndRasterBufferProvider(&raster_buffer_provider_, | 2170 CreateResourceAndRasterBufferProvider(&raster_buffer_provider_, |
| 2171 &resource_pool_); | 2171 &resource_pool_); |
| 2172 | 2172 |
| 2173 if (use_gpu_rasterization_) { | 2173 if (use_gpu_rasterization_) { |
| 2174 image_decode_cache_ = base::MakeUnique<GpuImageDecodeCache>( | 2174 image_decode_cache_ = base::MakeUnique<GpuImageDecodeCache>( |
| 2175 compositor_frame_sink_->worker_context_provider(), | 2175 compositor_frame_sink_->worker_context_provider(), |
| 2176 settings_.renderer_settings.preferred_tile_format, | 2176 settings_.renderer_settings.preferred_tile_format, |
| 2177 settings_.gpu_decoded_image_budget_bytes); | 2177 settings_.decoded_image_working_set_budget_bytes, |
| 2178 settings_.decoded_image_cache_budget_bytes); |
| 2178 } else { | 2179 } else { |
| 2179 image_decode_cache_ = base::MakeUnique<SoftwareImageDecodeCache>( | 2180 image_decode_cache_ = base::MakeUnique<SoftwareImageDecodeCache>( |
| 2180 settings_.renderer_settings.preferred_tile_format, | 2181 settings_.renderer_settings.preferred_tile_format, |
| 2181 settings_.software_decoded_image_budget_bytes); | 2182 settings_.decoded_image_working_set_budget_bytes); |
| 2182 } | 2183 } |
| 2183 | 2184 |
| 2184 // Pass the single-threaded synchronous task graph runner to the worker pool | 2185 // Pass the single-threaded synchronous task graph runner to the worker pool |
| 2185 // if we're in synchronous single-threaded mode. | 2186 // if we're in synchronous single-threaded mode. |
| 2186 TaskGraphRunner* task_graph_runner = task_graph_runner_; | 2187 TaskGraphRunner* task_graph_runner = task_graph_runner_; |
| 2187 if (is_synchronous_single_threaded_) { | 2188 if (is_synchronous_single_threaded_) { |
| 2188 DCHECK(!single_thread_synchronous_task_graph_runner_); | 2189 DCHECK(!single_thread_synchronous_task_graph_runner_); |
| 2189 single_thread_synchronous_task_graph_runner_.reset( | 2190 single_thread_synchronous_task_graph_runner_.reset( |
| 2190 new SynchronousTaskGraphRunner); | 2191 new SynchronousTaskGraphRunner); |
| 2191 task_graph_runner = single_thread_synchronous_task_graph_runner_.get(); | 2192 task_graph_runner = single_thread_synchronous_task_graph_runner_.get(); |
| (...skipping 1994 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4186 worker_context_visibility_ = | 4187 worker_context_visibility_ = |
| 4187 worker_context->CacheController()->ClientBecameVisible(); | 4188 worker_context->CacheController()->ClientBecameVisible(); |
| 4188 } else { | 4189 } else { |
| 4189 worker_context->CacheController()->ClientBecameNotVisible( | 4190 worker_context->CacheController()->ClientBecameNotVisible( |
| 4190 std::move(worker_context_visibility_)); | 4191 std::move(worker_context_visibility_)); |
| 4191 } | 4192 } |
| 4192 } | 4193 } |
| 4193 } | 4194 } |
| 4194 | 4195 |
| 4195 } // namespace cc | 4196 } // namespace cc |
| OLD | NEW |