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 #include <map> | 9 #include <map> |
10 #include <set> | 10 #include <set> |
(...skipping 2073 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2084 is_synchronous_single_threaded_ ? std::numeric_limits<size_t>::max() | 2084 is_synchronous_single_threaded_ ? std::numeric_limits<size_t>::max() |
2085 : settings_.scheduled_raster_task_limit); | 2085 : settings_.scheduled_raster_task_limit); |
2086 UpdateTileManagerMemoryPolicy(ActualManagedMemoryPolicy()); | 2086 UpdateTileManagerMemoryPolicy(ActualManagedMemoryPolicy()); |
2087 } | 2087 } |
2088 | 2088 |
2089 void LayerTreeHostImpl::CreateResourceAndTileTaskWorkerPool( | 2089 void LayerTreeHostImpl::CreateResourceAndTileTaskWorkerPool( |
2090 scoped_ptr<TileTaskWorkerPool>* tile_task_worker_pool, | 2090 scoped_ptr<TileTaskWorkerPool>* tile_task_worker_pool, |
2091 scoped_ptr<ResourcePool>* resource_pool, | 2091 scoped_ptr<ResourcePool>* resource_pool, |
2092 scoped_ptr<ResourcePool>* staging_resource_pool) { | 2092 scoped_ptr<ResourcePool>* staging_resource_pool) { |
2093 DCHECK(GetTaskRunner()); | 2093 DCHECK(GetTaskRunner()); |
| 2094 // TODO(vmpstr): Make this a DCHECK (or remove) when crbug.com/419086 is |
| 2095 // resolved. |
| 2096 CHECK(resource_provider_); |
2094 | 2097 |
2095 // Pass the single-threaded synchronous task graph runner to the worker pool | 2098 // Pass the single-threaded synchronous task graph runner to the worker pool |
2096 // if we're in synchronous single-threaded mode. | 2099 // if we're in synchronous single-threaded mode. |
2097 TaskGraphRunner* task_graph_runner = task_graph_runner_; | 2100 TaskGraphRunner* task_graph_runner = task_graph_runner_; |
2098 if (is_synchronous_single_threaded_) { | 2101 if (is_synchronous_single_threaded_) { |
2099 DCHECK(!single_thread_synchronous_task_graph_runner_); | 2102 DCHECK(!single_thread_synchronous_task_graph_runner_); |
2100 single_thread_synchronous_task_graph_runner_.reset(new TaskGraphRunner); | 2103 single_thread_synchronous_task_graph_runner_.reset(new TaskGraphRunner); |
2101 task_graph_runner = single_thread_synchronous_task_graph_runner_.get(); | 2104 task_graph_runner = single_thread_synchronous_task_graph_runner_.get(); |
2102 } | 2105 } |
2103 | 2106 |
(...skipping 1503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3607 if (active_tree()) { | 3610 if (active_tree()) { |
3608 LayerAnimationValueProvider* layer = active_tree()->LayerById(layer_id); | 3611 LayerAnimationValueProvider* layer = active_tree()->LayerById(layer_id); |
3609 if (layer) | 3612 if (layer) |
3610 return layer->ScrollOffsetForAnimation(); | 3613 return layer->ScrollOffsetForAnimation(); |
3611 } | 3614 } |
3612 | 3615 |
3613 return gfx::ScrollOffset(); | 3616 return gfx::ScrollOffset(); |
3614 } | 3617 } |
3615 | 3618 |
3616 } // namespace cc | 3619 } // namespace cc |
OLD | NEW |