| 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 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <cmath> | 10 #include <cmath> |
| 11 #include <utility> | 11 #include <utility> |
| 12 | 12 |
| 13 #include "base/bind.h" | 13 #include "base/bind.h" |
| 14 #include "base/command_line.h" | 14 #include "base/command_line.h" |
| 15 #include "base/containers/hash_tables.h" | 15 #include "base/containers/hash_tables.h" |
| 16 #include "base/containers/scoped_ptr_hash_map.h" | 16 #include "base/containers/scoped_ptr_hash_map.h" |
| 17 #include "base/location.h" | 17 #include "base/location.h" |
| 18 #include "base/thread_task_runner_handle.h" | 18 #include "base/thread_task_runner_handle.h" |
| 19 #include "cc/animation/animation_events.h" |
| 19 #include "cc/animation/animation_host.h" | 20 #include "cc/animation/animation_host.h" |
| 20 #include "cc/animation/animation_id_provider.h" | 21 #include "cc/animation/animation_id_provider.h" |
| 21 #include "cc/animation/scrollbar_animation_controller_thinning.h" | 22 #include "cc/animation/scrollbar_animation_controller_thinning.h" |
| 22 #include "cc/animation/transform_operations.h" | 23 #include "cc/animation/transform_operations.h" |
| 23 #include "cc/base/math_util.h" | 24 #include "cc/base/math_util.h" |
| 24 #include "cc/input/page_scale_animation.h" | 25 #include "cc/input/page_scale_animation.h" |
| 25 #include "cc/input/top_controls_manager.h" | 26 #include "cc/input/top_controls_manager.h" |
| 26 #include "cc/layers/append_quads_data.h" | 27 #include "cc/layers/append_quads_data.h" |
| 27 #include "cc/layers/delegated_renderer_layer_impl.h" | 28 #include "cc/layers/delegated_renderer_layer_impl.h" |
| 28 #include "cc/layers/heads_up_display_layer_impl.h" | 29 #include "cc/layers/heads_up_display_layer_impl.h" |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 } | 145 } |
| 145 void SetNeedsOneBeginImplFrameOnImplThread() override { | 146 void SetNeedsOneBeginImplFrameOnImplThread() override { |
| 146 did_request_next_frame_ = true; | 147 did_request_next_frame_ = true; |
| 147 } | 148 } |
| 148 void SetNeedsPrepareTilesOnImplThread() override { | 149 void SetNeedsPrepareTilesOnImplThread() override { |
| 149 did_request_prepare_tiles_ = true; | 150 did_request_prepare_tiles_ = true; |
| 150 } | 151 } |
| 151 void SetNeedsCommitOnImplThread() override { did_request_commit_ = true; } | 152 void SetNeedsCommitOnImplThread() override { did_request_commit_ = true; } |
| 152 void SetVideoNeedsBeginFrames(bool needs_begin_frames) override {} | 153 void SetVideoNeedsBeginFrames(bool needs_begin_frames) override {} |
| 153 void PostAnimationEventsToMainThreadOnImplThread( | 154 void PostAnimationEventsToMainThreadOnImplThread( |
| 154 scoped_ptr<AnimationEventsVector> events) override {} | 155 scoped_ptr<AnimationEvents> events) override {} |
| 155 bool IsInsideDraw() override { return false; } | 156 bool IsInsideDraw() override { return false; } |
| 156 void RenewTreePriority() override {} | 157 void RenewTreePriority() override {} |
| 157 void PostDelayedAnimationTaskOnImplThread(const base::Closure& task, | 158 void PostDelayedAnimationTaskOnImplThread(const base::Closure& task, |
| 158 base::TimeDelta delay) override { | 159 base::TimeDelta delay) override { |
| 159 animation_task_ = task; | 160 animation_task_ = task; |
| 160 requested_animation_delay_ = delay; | 161 requested_animation_delay_ = delay; |
| 161 } | 162 } |
| 162 void DidActivateSyncTree() override {} | 163 void DidActivateSyncTree() override {} |
| 163 void WillPrepareTiles() override {} | 164 void WillPrepareTiles() override {} |
| 164 void DidPrepareTiles() override {} | 165 void DidPrepareTiles() override {} |
| (...skipping 9584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9749 // There should not be any jitter measured till we hit the fixed point hits | 9750 // There should not be any jitter measured till we hit the fixed point hits |
| 9750 // threshold. | 9751 // threshold. |
| 9751 float expected_jitter = | 9752 float expected_jitter = |
| 9752 (i == pending_tree->kFixedPointHitsThreshold) ? 500 : 0; | 9753 (i == pending_tree->kFixedPointHitsThreshold) ? 500 : 0; |
| 9753 EXPECT_EQ(jitter, expected_jitter); | 9754 EXPECT_EQ(jitter, expected_jitter); |
| 9754 } | 9755 } |
| 9755 } | 9756 } |
| 9756 | 9757 |
| 9757 } // namespace | 9758 } // namespace |
| 9758 } // namespace cc | 9759 } // namespace cc |
| OLD | NEW |