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> |
(...skipping 9377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9388 host_impl_->ScrollAnimated(gfx::Point(), gfx::Vector2d(0, 50)).thread); | 9388 host_impl_->ScrollAnimated(gfx::Point(), gfx::Vector2d(0, 50)).thread); |
9389 | 9389 |
9390 LayerImpl* scrolling_layer = host_impl_->CurrentlyScrollingLayer(); | 9390 LayerImpl* scrolling_layer = host_impl_->CurrentlyScrollingLayer(); |
9391 | 9391 |
9392 begin_frame_args.frame_time = start_time; | 9392 begin_frame_args.frame_time = start_time; |
9393 host_impl_->WillBeginImplFrame(begin_frame_args); | 9393 host_impl_->WillBeginImplFrame(begin_frame_args); |
9394 host_impl_->Animate(); | 9394 host_impl_->Animate(); |
9395 host_impl_->UpdateAnimationState(true); | 9395 host_impl_->UpdateAnimationState(true); |
9396 | 9396 |
9397 EXPECT_TRUE(host_impl_->animation_host()->HasAnyAnimationTargetingProperty( | 9397 EXPECT_TRUE(host_impl_->animation_host()->HasAnyAnimationTargetingProperty( |
9398 scrolling_layer->id(), Animation::SCROLL_OFFSET)); | 9398 scrolling_layer->id(), AnimationTargetProperty::SCROLL_OFFSET)); |
9399 | 9399 |
9400 EXPECT_EQ(gfx::ScrollOffset(), scrolling_layer->CurrentScrollOffset()); | 9400 EXPECT_EQ(gfx::ScrollOffset(), scrolling_layer->CurrentScrollOffset()); |
9401 host_impl_->DidFinishImplFrame(); | 9401 host_impl_->DidFinishImplFrame(); |
9402 | 9402 |
9403 begin_frame_args.frame_time = | 9403 begin_frame_args.frame_time = |
9404 start_time + base::TimeDelta::FromMilliseconds(50); | 9404 start_time + base::TimeDelta::FromMilliseconds(50); |
9405 host_impl_->WillBeginImplFrame(begin_frame_args); | 9405 host_impl_->WillBeginImplFrame(begin_frame_args); |
9406 host_impl_->Animate(); | 9406 host_impl_->Animate(); |
9407 host_impl_->UpdateAnimationState(true); | 9407 host_impl_->UpdateAnimationState(true); |
9408 | 9408 |
(...skipping 716 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10125 // There should not be any jitter measured till we hit the fixed point hits | 10125 // There should not be any jitter measured till we hit the fixed point hits |
10126 // threshold. | 10126 // threshold. |
10127 float expected_jitter = | 10127 float expected_jitter = |
10128 (i == pending_tree->kFixedPointHitsThreshold) ? 500 : 0; | 10128 (i == pending_tree->kFixedPointHitsThreshold) ? 500 : 0; |
10129 EXPECT_EQ(jitter, expected_jitter); | 10129 EXPECT_EQ(jitter, expected_jitter); |
10130 } | 10130 } |
10131 } | 10131 } |
10132 | 10132 |
10133 } // namespace | 10133 } // namespace |
10134 } // namespace cc | 10134 } // namespace cc |
OLD | NEW |