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 9385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9396 host_impl_->ScrollAnimated(gfx::Point(), gfx::Vector2d(0, 50)).thread); | 9396 host_impl_->ScrollAnimated(gfx::Point(), gfx::Vector2d(0, 50)).thread); |
9397 | 9397 |
9398 LayerImpl* scrolling_layer = host_impl_->CurrentlyScrollingLayer(); | 9398 LayerImpl* scrolling_layer = host_impl_->CurrentlyScrollingLayer(); |
9399 | 9399 |
9400 begin_frame_args.frame_time = start_time; | 9400 begin_frame_args.frame_time = start_time; |
9401 host_impl_->WillBeginImplFrame(begin_frame_args); | 9401 host_impl_->WillBeginImplFrame(begin_frame_args); |
9402 host_impl_->Animate(); | 9402 host_impl_->Animate(); |
9403 host_impl_->UpdateAnimationState(true); | 9403 host_impl_->UpdateAnimationState(true); |
9404 | 9404 |
9405 EXPECT_TRUE(host_impl_->animation_host()->HasAnyAnimationTargetingProperty( | 9405 EXPECT_TRUE(host_impl_->animation_host()->HasAnyAnimationTargetingProperty( |
9406 scrolling_layer->id(), Animation::SCROLL_OFFSET)); | 9406 scrolling_layer->id(), TargetProperty::SCROLL_OFFSET)); |
9407 | 9407 |
9408 EXPECT_EQ(gfx::ScrollOffset(), scrolling_layer->CurrentScrollOffset()); | 9408 EXPECT_EQ(gfx::ScrollOffset(), scrolling_layer->CurrentScrollOffset()); |
9409 host_impl_->DidFinishImplFrame(); | 9409 host_impl_->DidFinishImplFrame(); |
9410 | 9410 |
9411 begin_frame_args.frame_time = | 9411 begin_frame_args.frame_time = |
9412 start_time + base::TimeDelta::FromMilliseconds(50); | 9412 start_time + base::TimeDelta::FromMilliseconds(50); |
9413 host_impl_->WillBeginImplFrame(begin_frame_args); | 9413 host_impl_->WillBeginImplFrame(begin_frame_args); |
9414 host_impl_->Animate(); | 9414 host_impl_->Animate(); |
9415 host_impl_->UpdateAnimationState(true); | 9415 host_impl_->UpdateAnimationState(true); |
9416 | 9416 |
(...skipping 717 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10134 // There should not be any jitter measured till we hit the fixed point hits | 10134 // There should not be any jitter measured till we hit the fixed point hits |
10135 // threshold. | 10135 // threshold. |
10136 float expected_jitter = | 10136 float expected_jitter = |
10137 (i == pending_tree->kFixedPointHitsThreshold) ? 500 : 0; | 10137 (i == pending_tree->kFixedPointHitsThreshold) ? 500 : 0; |
10138 EXPECT_EQ(jitter, expected_jitter); | 10138 EXPECT_EQ(jitter, expected_jitter); |
10139 } | 10139 } |
10140 } | 10140 } |
10141 | 10141 |
10142 } // namespace | 10142 } // namespace |
10143 } // namespace cc | 10143 } // namespace cc |
OLD | NEW |