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 "base/trace_event/trace_event_argument.h" | 16 #include "base/trace_event/trace_event_argument.h" |
17 #include "cc/animation/animation_id_provider.h" | 17 #include "cc/animation/animation_id_provider.h" |
18 #include "cc/animation/scroll_offset_animation_curve.h" | 18 #include "cc/animation/scroll_offset_animation_curve.h" |
19 #include "cc/animation/scrollbar_animation_controller.h" | 19 #include "cc/animation/scrollbar_animation_controller.h" |
20 #include "cc/animation/timing_function.h" | 20 #include "cc/animation/timing_function.h" |
21 #include "cc/base/latency_info_swap_promise_monitor.h" | |
22 #include "cc/base/math_util.h" | 21 #include "cc/base/math_util.h" |
23 #include "cc/base/util.h" | 22 #include "cc/base/util.h" |
24 #include "cc/debug/benchmark_instrumentation.h" | 23 #include "cc/debug/benchmark_instrumentation.h" |
25 #include "cc/debug/debug_rect_history.h" | 24 #include "cc/debug/debug_rect_history.h" |
26 #include "cc/debug/devtools_instrumentation.h" | 25 #include "cc/debug/devtools_instrumentation.h" |
27 #include "cc/debug/frame_rate_counter.h" | 26 #include "cc/debug/frame_rate_counter.h" |
28 #include "cc/debug/paint_time_counter.h" | 27 #include "cc/debug/paint_time_counter.h" |
29 #include "cc/debug/rendering_stats_instrumentation.h" | 28 #include "cc/debug/rendering_stats_instrumentation.h" |
30 #include "cc/debug/traced_value.h" | 29 #include "cc/debug/traced_value.h" |
31 #include "cc/input/page_scale_animation.h" | 30 #include "cc/input/page_scale_animation.h" |
(...skipping 26 matching lines...) Expand all Loading... |
58 #include "cc/resources/prioritized_resource_manager.h" | 57 #include "cc/resources/prioritized_resource_manager.h" |
59 #include "cc/resources/raster_tile_priority_queue.h" | 58 #include "cc/resources/raster_tile_priority_queue.h" |
60 #include "cc/resources/resource_pool.h" | 59 #include "cc/resources/resource_pool.h" |
61 #include "cc/resources/software_rasterizer.h" | 60 #include "cc/resources/software_rasterizer.h" |
62 #include "cc/resources/texture_mailbox_deleter.h" | 61 #include "cc/resources/texture_mailbox_deleter.h" |
63 #include "cc/resources/tile_task_worker_pool.h" | 62 #include "cc/resources/tile_task_worker_pool.h" |
64 #include "cc/resources/ui_resource_bitmap.h" | 63 #include "cc/resources/ui_resource_bitmap.h" |
65 #include "cc/resources/zero_copy_tile_task_worker_pool.h" | 64 #include "cc/resources/zero_copy_tile_task_worker_pool.h" |
66 #include "cc/scheduler/delay_based_time_source.h" | 65 #include "cc/scheduler/delay_based_time_source.h" |
67 #include "cc/trees/damage_tracker.h" | 66 #include "cc/trees/damage_tracker.h" |
| 67 #include "cc/trees/latency_info_swap_promise_monitor.h" |
68 #include "cc/trees/layer_tree_host.h" | 68 #include "cc/trees/layer_tree_host.h" |
69 #include "cc/trees/layer_tree_host_common.h" | 69 #include "cc/trees/layer_tree_host_common.h" |
70 #include "cc/trees/layer_tree_impl.h" | 70 #include "cc/trees/layer_tree_impl.h" |
71 #include "cc/trees/single_thread_proxy.h" | 71 #include "cc/trees/single_thread_proxy.h" |
72 #include "cc/trees/tree_synchronizer.h" | 72 #include "cc/trees/tree_synchronizer.h" |
| 73 #include "gpu/GLES2/gl2extchromium.h" |
73 #include "gpu/command_buffer/client/gles2_interface.h" | 74 #include "gpu/command_buffer/client/gles2_interface.h" |
74 #include "gpu/GLES2/gl2extchromium.h" | |
75 #include "ui/gfx/frame_time.h" | 75 #include "ui/gfx/frame_time.h" |
76 #include "ui/gfx/geometry/rect_conversions.h" | 76 #include "ui/gfx/geometry/rect_conversions.h" |
77 #include "ui/gfx/geometry/scroll_offset.h" | 77 #include "ui/gfx/geometry/scroll_offset.h" |
78 #include "ui/gfx/geometry/size_conversions.h" | 78 #include "ui/gfx/geometry/size_conversions.h" |
79 #include "ui/gfx/geometry/vector2d_conversions.h" | 79 #include "ui/gfx/geometry/vector2d_conversions.h" |
80 | 80 |
81 namespace cc { | 81 namespace cc { |
82 namespace { | 82 namespace { |
83 | 83 |
84 // Small helper class that saves the current viewport location as the user sees | 84 // Small helper class that saves the current viewport location as the user sees |
(...skipping 3385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3470 new_target.SetToMin(layer_impl->MaxScrollOffset()); | 3470 new_target.SetToMin(layer_impl->MaxScrollOffset()); |
3471 | 3471 |
3472 curve->UpdateTarget( | 3472 curve->UpdateTarget( |
3473 animation->TrimTimeToCurrentIteration(CurrentBeginFrameArgs().frame_time) | 3473 animation->TrimTimeToCurrentIteration(CurrentBeginFrameArgs().frame_time) |
3474 .InSecondsF(), | 3474 .InSecondsF(), |
3475 new_target); | 3475 new_target); |
3476 | 3476 |
3477 return true; | 3477 return true; |
3478 } | 3478 } |
3479 } // namespace cc | 3479 } // namespace cc |
OLD | NEW |