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 2121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2132 | 2132 |
2133 *resource_pool = ResourcePool::Create(resource_provider_.get(), | 2133 *resource_pool = ResourcePool::Create(resource_provider_.get(), |
2134 GetTaskRunner(), GL_TEXTURE_2D); | 2134 GetTaskRunner(), GL_TEXTURE_2D); |
2135 | 2135 |
2136 int max_copy_texture_chromium_size = context_provider->ContextCapabilities() | 2136 int max_copy_texture_chromium_size = context_provider->ContextCapabilities() |
2137 .gpu.max_copy_texture_chromium_size; | 2137 .gpu.max_copy_texture_chromium_size; |
2138 | 2138 |
2139 *tile_task_worker_pool = OneCopyTileTaskWorkerPool::Create( | 2139 *tile_task_worker_pool = OneCopyTileTaskWorkerPool::Create( |
2140 GetTaskRunner(), task_graph_runner, context_provider, | 2140 GetTaskRunner(), task_graph_runner, context_provider, |
2141 resource_provider_.get(), max_copy_texture_chromium_size, | 2141 resource_provider_.get(), max_copy_texture_chromium_size, |
2142 settings_.use_persistent_map_for_gpu_memory_buffers, | 2142 settings_.use_partial_raster, settings_.max_staging_buffer_usage_in_bytes, |
2143 settings_.max_staging_buffer_usage_in_bytes, | |
2144 settings_.renderer_settings.use_rgba_4444_textures); | 2143 settings_.renderer_settings.use_rgba_4444_textures); |
2145 } | 2144 } |
2146 | 2145 |
2147 void LayerTreeHostImpl::RecordMainFrameTiming( | 2146 void LayerTreeHostImpl::RecordMainFrameTiming( |
2148 const BeginFrameArgs& start_of_main_frame_args, | 2147 const BeginFrameArgs& start_of_main_frame_args, |
2149 const BeginFrameArgs& expected_next_main_frame_args) { | 2148 const BeginFrameArgs& expected_next_main_frame_args) { |
2150 std::vector<int64_t> request_ids; | 2149 std::vector<int64_t> request_ids; |
2151 active_tree_->GatherFrameTimingRequestIds(&request_ids); | 2150 active_tree_->GatherFrameTimingRequestIds(&request_ids); |
2152 if (request_ids.empty()) | 2151 if (request_ids.empty()) |
2153 return; | 2152 return; |
(...skipping 1448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3602 if (active_tree()) { | 3601 if (active_tree()) { |
3603 LayerAnimationValueProvider* layer = active_tree()->LayerById(layer_id); | 3602 LayerAnimationValueProvider* layer = active_tree()->LayerById(layer_id); |
3604 if (layer) | 3603 if (layer) |
3605 return layer->ScrollOffsetForAnimation(); | 3604 return layer->ScrollOffsetForAnimation(); |
3606 } | 3605 } |
3607 | 3606 |
3608 return gfx::ScrollOffset(); | 3607 return gfx::ScrollOffset(); |
3609 } | 3608 } |
3610 | 3609 |
3611 } // namespace cc | 3610 } // namespace cc |
OLD | NEW |