| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/animation/animation_player.h" | 5 #include "cc/animation/animation_player.h" |
| 6 | 6 |
| 7 #include "cc/animation/animation_delegate.h" | 7 #include "cc/animation/animation_delegate.h" |
| 8 #include "cc/animation/animation_host.h" | 8 #include "cc/animation/animation_host.h" |
| 9 #include "cc/animation/animation_id_provider.h" | 9 #include "cc/animation/animation_id_provider.h" |
| 10 #include "cc/animation/animation_timeline.h" | 10 #include "cc/animation/animation_timeline.h" |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 | 165 |
| 166 host_impl_->ActivateAnimations(); | 166 host_impl_->ActivateAnimations(); |
| 167 | 167 |
| 168 base::TimeTicks time; | 168 base::TimeTicks time; |
| 169 time += base::TimeDelta::FromSecondsD(0.1); | 169 time += base::TimeDelta::FromSecondsD(0.1); |
| 170 TickAnimationsTransferEvents(time, 3u); | 170 TickAnimationsTransferEvents(time, 3u); |
| 171 EXPECT_TRUE(CheckPlayerTimelineNeedsPushProperties(false)); | 171 EXPECT_TRUE(CheckPlayerTimelineNeedsPushProperties(false)); |
| 172 | 172 |
| 173 time += base::TimeDelta::FromSecondsD(duration); | 173 time += base::TimeDelta::FromSecondsD(duration); |
| 174 TickAnimationsTransferEvents(time, 3u); | 174 TickAnimationsTransferEvents(time, 3u); |
| 175 EXPECT_TRUE(CheckPlayerTimelineNeedsPushProperties(false)); | 175 EXPECT_TRUE(CheckPlayerTimelineNeedsPushProperties(true)); |
| 176 | 176 |
| 177 client_.ExpectOpacityPropertyMutated(element_id_, ElementListType::ACTIVE, | 177 client_.ExpectOpacityPropertyMutated(element_id_, ElementListType::ACTIVE, |
| 178 end_opacity); | 178 end_opacity); |
| 179 client_.ExpectTransformPropertyMutated(element_id_, ElementListType::ACTIVE, | 179 client_.ExpectTransformPropertyMutated(element_id_, ElementListType::ACTIVE, |
| 180 transform_x, transform_y); | 180 transform_x, transform_y); |
| 181 client_.ExpectFilterPropertyMutated(element_id_, ElementListType::ACTIVE, | 181 client_.ExpectFilterPropertyMutated(element_id_, ElementListType::ACTIVE, |
| 182 end_brightness); | 182 end_brightness); |
| 183 | 183 |
| 184 client_impl_.ExpectOpacityPropertyMutated( | 184 client_impl_.ExpectOpacityPropertyMutated( |
| 185 element_id_, ElementListType::ACTIVE, end_opacity); | 185 element_id_, ElementListType::ACTIVE, end_opacity); |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 | 258 |
| 259 EXPECT_FALSE(player1->needs_push_properties()); | 259 EXPECT_FALSE(player1->needs_push_properties()); |
| 260 EXPECT_FALSE(player2->needs_push_properties()); | 260 EXPECT_FALSE(player2->needs_push_properties()); |
| 261 | 261 |
| 262 time += base::TimeDelta::FromSecondsD(duration); | 262 time += base::TimeDelta::FromSecondsD(duration); |
| 263 TickAnimationsTransferEvents(time, 2u); | 263 TickAnimationsTransferEvents(time, 2u); |
| 264 | 264 |
| 265 EXPECT_TRUE(delegate1.finished()); | 265 EXPECT_TRUE(delegate1.finished()); |
| 266 EXPECT_TRUE(delegate2.finished()); | 266 EXPECT_TRUE(delegate2.finished()); |
| 267 | 267 |
| 268 EXPECT_FALSE(player1->needs_push_properties()); | 268 EXPECT_TRUE(player1->needs_push_properties()); |
| 269 EXPECT_FALSE(player2->needs_push_properties()); | 269 EXPECT_TRUE(player2->needs_push_properties()); |
| 270 | 270 |
| 271 client_.ExpectOpacityPropertyMutated(element_id_, ElementListType::ACTIVE, | 271 client_.ExpectOpacityPropertyMutated(element_id_, ElementListType::ACTIVE, |
| 272 end_opacity); | 272 end_opacity); |
| 273 client_.ExpectTransformPropertyMutated(element_id_, ElementListType::ACTIVE, | 273 client_.ExpectTransformPropertyMutated(element_id_, ElementListType::ACTIVE, |
| 274 transform_x, transform_y); | 274 transform_x, transform_y); |
| 275 | 275 |
| 276 client_impl_.ExpectOpacityPropertyMutated( | 276 client_impl_.ExpectOpacityPropertyMutated( |
| 277 element_id_, ElementListType::ACTIVE, end_opacity); | 277 element_id_, ElementListType::ACTIVE, end_opacity); |
| 278 client_impl_.ExpectTransformPropertyMutated( | 278 client_impl_.ExpectTransformPropertyMutated( |
| 279 element_id_, ElementListType::ACTIVE, transform_x, transform_y); | 279 element_id_, ElementListType::ACTIVE, transform_x, transform_y); |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 405 | 405 |
| 406 host_->PushPropertiesTo(host_impl_); | 406 host_->PushPropertiesTo(host_impl_); |
| 407 | 407 |
| 408 EXPECT_EQ(player_impl_, GetImplPlayerForLayerId(new_element_id)); | 408 EXPECT_EQ(player_impl_, GetImplPlayerForLayerId(new_element_id)); |
| 409 EXPECT_TRUE(player_impl_->element_animations()); | 409 EXPECT_TRUE(player_impl_->element_animations()); |
| 410 EXPECT_EQ(player_impl_->element_id(), new_element_id); | 410 EXPECT_EQ(player_impl_->element_id(), new_element_id); |
| 411 } | 411 } |
| 412 | 412 |
| 413 } // namespace | 413 } // namespace |
| 414 } // namespace cc | 414 } // namespace cc |
| OLD | NEW |