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 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/containers/hash_tables.h" | 11 #include "base/containers/hash_tables.h" |
12 #include "base/json/json_writer.h" | 12 #include "base/json/json_writer.h" |
13 #include "base/metrics/histogram.h" | 13 #include "base/metrics/histogram.h" |
14 #include "base/stl_util.h" | 14 #include "base/stl_util.h" |
15 #include "base/strings/stringprintf.h" | 15 #include "base/strings/stringprintf.h" |
16 #include "cc/animation/scrollbar_animation_controller.h" | 16 #include "cc/animation/scrollbar_animation_controller.h" |
17 #include "cc/animation/timing_function.h" | 17 #include "cc/animation/timing_function.h" |
18 #include "cc/base/latency_info_swap_promise_monitor.h" | 18 #include "cc/base/latency_info_swap_promise_monitor.h" |
19 #include "cc/base/math_util.h" | 19 #include "cc/base/math_util.h" |
20 #include "cc/base/switches.h" | |
20 #include "cc/base/util.h" | 21 #include "cc/base/util.h" |
21 #include "cc/debug/benchmark_instrumentation.h" | 22 #include "cc/debug/benchmark_instrumentation.h" |
22 #include "cc/debug/debug_rect_history.h" | 23 #include "cc/debug/debug_rect_history.h" |
23 #include "cc/debug/devtools_instrumentation.h" | 24 #include "cc/debug/devtools_instrumentation.h" |
24 #include "cc/debug/frame_rate_counter.h" | 25 #include "cc/debug/frame_rate_counter.h" |
25 #include "cc/debug/overdraw_metrics.h" | 26 #include "cc/debug/overdraw_metrics.h" |
26 #include "cc/debug/paint_time_counter.h" | 27 #include "cc/debug/paint_time_counter.h" |
27 #include "cc/debug/rendering_stats_instrumentation.h" | 28 #include "cc/debug/rendering_stats_instrumentation.h" |
28 #include "cc/debug/traced_value.h" | 29 #include "cc/debug/traced_value.h" |
29 #include "cc/input/page_scale_animation.h" | 30 #include "cc/input/page_scale_animation.h" |
(...skipping 1684 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1714 | 1715 |
1715 void LayerTreeHostImpl::CreateAndSetTileManager( | 1716 void LayerTreeHostImpl::CreateAndSetTileManager( |
1716 ResourceProvider* resource_provider, | 1717 ResourceProvider* resource_provider, |
1717 ContextProvider* context_provider, | 1718 ContextProvider* context_provider, |
1718 bool using_map_image) { | 1719 bool using_map_image) { |
1719 DCHECK(settings_.impl_side_painting); | 1720 DCHECK(settings_.impl_side_painting); |
1720 DCHECK(resource_provider); | 1721 DCHECK(resource_provider); |
1721 tile_manager_ = | 1722 tile_manager_ = |
1722 TileManager::Create(this, | 1723 TileManager::Create(this, |
1723 resource_provider, | 1724 resource_provider, |
1724 settings_.num_raster_threads, | 1725 switches::GetNumRasterThreads(), |
reveman
2013/12/27 14:57:13
num_raster_threads is not used by TileManager, Pix
sohanjg
2013/12/28 09:15:17
Done.
| |
1725 rendering_stats_instrumentation_, | 1726 rendering_stats_instrumentation_, |
1726 using_map_image, | 1727 using_map_image, |
1727 GetMaxTransferBufferUsageBytes(context_provider), | 1728 GetMaxTransferBufferUsageBytes(context_provider), |
1728 GetMaxRasterTasksUsageBytes(context_provider), | 1729 GetMaxRasterTasksUsageBytes(context_provider), |
1729 GetMapImageTextureTarget(context_provider)); | 1730 GetMapImageTextureTarget(context_provider)); |
1730 | 1731 |
1731 UpdateTileManagerMemoryPolicy(ActualManagedMemoryPolicy()); | 1732 UpdateTileManagerMemoryPolicy(ActualManagedMemoryPolicy()); |
1732 need_to_update_visible_tiles_before_draw_ = false; | 1733 need_to_update_visible_tiles_before_draw_ = false; |
1733 } | 1734 } |
1734 | 1735 |
(...skipping 1183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2918 swap_promise_monitor_.erase(monitor); | 2919 swap_promise_monitor_.erase(monitor); |
2919 } | 2920 } |
2920 | 2921 |
2921 void LayerTreeHostImpl::NotifySwapPromiseMonitorsOfSetNeedsRedraw() { | 2922 void LayerTreeHostImpl::NotifySwapPromiseMonitorsOfSetNeedsRedraw() { |
2922 std::set<SwapPromiseMonitor*>::iterator it = swap_promise_monitor_.begin(); | 2923 std::set<SwapPromiseMonitor*>::iterator it = swap_promise_monitor_.begin(); |
2923 for (; it != swap_promise_monitor_.end(); it++) | 2924 for (; it != swap_promise_monitor_.end(); it++) |
2924 (*it)->OnSetNeedsRedrawOnImpl(); | 2925 (*it)->OnSetNeedsRedrawOnImpl(); |
2925 } | 2926 } |
2926 | 2927 |
2927 } // namespace cc | 2928 } // namespace cc |
OLD | NEW |