| 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/test/animation_timelines_test_common.h" | 5 #include "cc/test/animation_timelines_test_common.h" |
| 6 | 6 |
| 7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
| 8 #include "cc/animation/animation_events.h" | 8 #include "cc/animation/animation_events.h" |
| 9 #include "cc/animation/animation_id_provider.h" | 9 #include "cc/animation/animation_id_provider.h" |
| 10 #include "cc/animation/animation_player.h" | 10 #include "cc/animation/animation_player.h" |
| 11 #include "cc/animation/animation_timeline.h" | 11 #include "cc/animation/animation_timeline.h" |
| 12 #include "cc/animation/element_animations.h" | 12 #include "cc/animation/element_animations.h" |
| 13 #include "cc/output/filter_operation.h" | 13 #include "cc/output/filter_operation.h" |
| 14 #include "cc/output/filter_operations.h" | 14 #include "cc/output/filter_operations.h" |
| 15 #include "ui/gfx/transform.h" | 15 #include "ui/gfx/transform.h" |
| 16 | 16 |
| 17 namespace cc { | 17 namespace cc { |
| 18 | 18 |
| 19 std::unique_ptr<TestLayer> TestLayer::Create() { | 19 std::unique_ptr<TestLayer> TestLayer::Create() { |
| 20 return base::WrapUnique(new TestLayer()); | 20 return base::WrapUnique(new TestLayer()); |
| 21 } | 21 } |
| 22 | 22 |
| 23 TestLayer::TestLayer() { | 23 TestLayer::TestLayer() { |
| 24 ClearMutatedProperties(); | 24 ClearMutatedProperties(); |
| 25 } | 25 } |
| 26 | 26 |
| 27 void TestLayer::ClearMutatedProperties() { | 27 void TestLayer::ClearMutatedProperties() { |
| 28 transform_x_ = 0; | 28 transform_ = gfx::Transform(); |
| 29 transform_y_ = 0; | |
| 30 | |
| 31 opacity_ = 0; | 29 opacity_ = 0; |
| 32 brightness_ = 0; | 30 filters_ = FilterOperations(); |
| 31 scroll_offset_ = gfx::ScrollOffset(); |
| 32 transform_is_animating_ = false; |
| 33 | 33 |
| 34 for (int i = 0; i <= TargetProperty::LAST_TARGET_PROPERTY; ++i) | 34 for (int i = 0; i <= TargetProperty::LAST_TARGET_PROPERTY; ++i) |
| 35 mutated_properties_[i] = false; | 35 mutated_properties_[i] = false; |
| 36 } | 36 } |
| 37 | 37 |
| 38 int TestLayer::transform_x() const { |
| 39 gfx::Vector2dF vec = transform_.To2dTranslation(); |
| 40 return static_cast<int>(vec.x()); |
| 41 } |
| 42 |
| 43 int TestLayer::transform_y() const { |
| 44 gfx::Vector2dF vec = transform_.To2dTranslation(); |
| 45 return static_cast<int>(vec.y()); |
| 46 } |
| 47 |
| 48 float TestLayer::brightness() const { |
| 49 for (unsigned i = 0; i < filters_.size(); ++i) { |
| 50 const FilterOperation& filter = filters_.at(i); |
| 51 if (filter.type() == FilterOperation::BRIGHTNESS) |
| 52 return filter.amount(); |
| 53 } |
| 54 |
| 55 NOTREACHED(); |
| 56 return 0; |
| 57 } |
| 58 |
| 38 TestHostClient::TestHostClient(ThreadInstance thread_instance) | 59 TestHostClient::TestHostClient(ThreadInstance thread_instance) |
| 39 : host_(AnimationHost::Create(thread_instance)), | 60 : host_(AnimationHost::Create(thread_instance)), |
| 40 mutators_need_commit_(false) { | 61 mutators_need_commit_(false) { |
| 41 host_->SetMutatorHostClient(this); | 62 host_->SetMutatorHostClient(this); |
| 42 host_->SetSupportsScrollAnimations(true); | 63 host_->SetSupportsScrollAnimations(true); |
| 43 } | 64 } |
| 44 | 65 |
| 45 TestHostClient::~TestHostClient() { | 66 TestHostClient::~TestHostClient() { |
| 46 host_->SetMutatorHostClient(nullptr); | 67 host_->SetMutatorHostClient(nullptr); |
| 47 } | 68 } |
| (...skipping 14 matching lines...) Expand all Loading... |
| 62 | 83 |
| 63 void TestHostClient::SetMutatorsNeedCommit() { | 84 void TestHostClient::SetMutatorsNeedCommit() { |
| 64 mutators_need_commit_ = true; | 85 mutators_need_commit_ = true; |
| 65 } | 86 } |
| 66 | 87 |
| 67 void TestHostClient::SetMutatorsNeedRebuildPropertyTrees() {} | 88 void TestHostClient::SetMutatorsNeedRebuildPropertyTrees() {} |
| 68 | 89 |
| 69 void TestHostClient::SetLayerFilterMutated(int layer_id, | 90 void TestHostClient::SetLayerFilterMutated(int layer_id, |
| 70 LayerTreeType tree_type, | 91 LayerTreeType tree_type, |
| 71 const FilterOperations& filters) { | 92 const FilterOperations& filters) { |
| 72 for (unsigned i = 0; i < filters.size(); ++i) { | 93 TestLayer* layer = FindTestLayer(layer_id, tree_type); |
| 73 const FilterOperation& filter = filters.at(i); | 94 if (layer) |
| 74 if (filter.type() == FilterOperation::BRIGHTNESS) { | 95 layer->set_filters(filters); |
| 75 TestLayer* layer = FindTestLayer(layer_id, tree_type); | |
| 76 layer->set_brightness(filter.amount()); | |
| 77 } | |
| 78 } | |
| 79 } | 96 } |
| 80 | 97 |
| 81 void TestHostClient::SetLayerOpacityMutated(int layer_id, | 98 void TestHostClient::SetLayerOpacityMutated(int layer_id, |
| 82 LayerTreeType tree_type, | 99 LayerTreeType tree_type, |
| 83 float opacity) { | 100 float opacity) { |
| 84 TestLayer* layer = FindTestLayer(layer_id, tree_type); | 101 TestLayer* layer = FindTestLayer(layer_id, tree_type); |
| 85 layer->set_opacity(opacity); | 102 if (layer) |
| 103 layer->set_opacity(opacity); |
| 86 } | 104 } |
| 87 | 105 |
| 88 void TestHostClient::SetLayerTransformMutated(int layer_id, | 106 void TestHostClient::SetLayerTransformMutated(int layer_id, |
| 89 LayerTreeType tree_type, | 107 LayerTreeType tree_type, |
| 90 const gfx::Transform& transform) { | 108 const gfx::Transform& transform) { |
| 91 TestLayer* layer = FindTestLayer(layer_id, tree_type); | 109 TestLayer* layer = FindTestLayer(layer_id, tree_type); |
| 92 gfx::Vector2dF vec = transform.To2dTranslation(); | 110 if (layer) |
| 93 layer->set_transform(static_cast<int>(vec.x()), static_cast<int>(vec.y())); | 111 layer->set_transform(transform); |
| 94 } | 112 } |
| 95 | 113 |
| 96 void TestHostClient::SetLayerScrollOffsetMutated( | 114 void TestHostClient::SetLayerScrollOffsetMutated( |
| 97 int layer_id, | 115 int layer_id, |
| 98 LayerTreeType tree_type, | 116 LayerTreeType tree_type, |
| 99 const gfx::ScrollOffset& scroll_offset) { | 117 const gfx::ScrollOffset& scroll_offset) { |
| 100 TestLayer* layer = FindTestLayer(layer_id, tree_type); | 118 TestLayer* layer = FindTestLayer(layer_id, tree_type); |
| 101 layer->set_scroll_offset(scroll_offset); | 119 if (layer) |
| 120 layer->set_scroll_offset(scroll_offset); |
| 121 } |
| 122 |
| 123 void TestHostClient::LayerTransformIsPotentiallyAnimatingChanged( |
| 124 int layer_id, |
| 125 LayerTreeType tree_type, |
| 126 bool is_animating) { |
| 127 TestLayer* layer = FindTestLayer(layer_id, tree_type); |
| 128 if (layer) |
| 129 layer->set_transform_is_animating(is_animating); |
| 130 } |
| 131 |
| 132 void TestHostClient::SetScrollOffsetForAnimation( |
| 133 const gfx::ScrollOffset& scroll_offset) { |
| 134 scroll_offset_ = scroll_offset; |
| 102 } | 135 } |
| 103 | 136 |
| 104 gfx::ScrollOffset TestHostClient::GetScrollOffsetForAnimation( | 137 gfx::ScrollOffset TestHostClient::GetScrollOffsetForAnimation( |
| 105 int layer_id) const { | 138 int layer_id) const { |
| 106 return gfx::ScrollOffset(); | 139 return scroll_offset_; |
| 107 } | 140 } |
| 108 | 141 |
| 109 void TestHostClient::RegisterLayer(int layer_id, LayerTreeType tree_type) { | 142 void TestHostClient::RegisterLayer(int layer_id, LayerTreeType tree_type) { |
| 110 LayerIdToTestLayer& layers_in_tree = tree_type == LayerTreeType::ACTIVE | 143 LayerIdToTestLayer& layers_in_tree = tree_type == LayerTreeType::ACTIVE |
| 111 ? layers_in_active_tree_ | 144 ? layers_in_active_tree_ |
| 112 : layers_in_pending_tree_; | 145 : layers_in_pending_tree_; |
| 113 DCHECK(layers_in_tree.find(layer_id) == layers_in_tree.end()); | 146 DCHECK(layers_in_tree.find(layer_id) == layers_in_tree.end()); |
| 114 layers_in_tree[layer_id] = TestLayer::Create(); | 147 layers_in_tree[layer_id] = TestLayer::Create(); |
| 115 | 148 |
| 116 DCHECK(host_); | 149 DCHECK(host_); |
| 117 host_->RegisterLayer(layer_id, tree_type); | 150 host_->RegisterLayer(layer_id, tree_type); |
| 118 } | 151 } |
| 119 | 152 |
| 120 void TestHostClient::UnregisterLayer(int layer_id, LayerTreeType tree_type) { | 153 void TestHostClient::UnregisterLayer(int layer_id, LayerTreeType tree_type) { |
| 121 DCHECK(host_); | 154 DCHECK(host_); |
| 122 host_->UnregisterLayer(layer_id, tree_type); | 155 host_->UnregisterLayer(layer_id, tree_type); |
| 123 | 156 |
| 124 LayerIdToTestLayer& layers_in_tree = tree_type == LayerTreeType::ACTIVE | 157 LayerIdToTestLayer& layers_in_tree = tree_type == LayerTreeType::ACTIVE |
| 125 ? layers_in_active_tree_ | 158 ? layers_in_active_tree_ |
| 126 : layers_in_pending_tree_; | 159 : layers_in_pending_tree_; |
| 127 auto kv = layers_in_tree.find(layer_id); | 160 auto kv = layers_in_tree.find(layer_id); |
| 128 DCHECK(kv != layers_in_tree.end()); | 161 DCHECK(kv != layers_in_tree.end()); |
| 129 layers_in_tree.erase(kv); | 162 layers_in_tree.erase(kv); |
| 130 } | 163 } |
| 131 | 164 |
| 132 bool TestHostClient::IsPropertyMutated(int layer_id, | 165 bool TestHostClient::IsPropertyMutated(int layer_id, |
| 133 LayerTreeType tree_type, | 166 LayerTreeType tree_type, |
| 134 TargetProperty::Type property) const { | 167 TargetProperty::Type property) const { |
| 135 TestLayer* layer = FindTestLayer(layer_id, tree_type); | 168 TestLayer* layer = FindTestLayer(layer_id, tree_type); |
| 169 EXPECT_TRUE(layer); |
| 136 return layer->is_property_mutated(property); | 170 return layer->is_property_mutated(property); |
| 137 } | 171 } |
| 138 | 172 |
| 173 FilterOperations TestHostClient::GetFilters(int layer_id, |
| 174 LayerTreeType tree_type) const { |
| 175 TestLayer* layer = FindTestLayer(layer_id, tree_type); |
| 176 EXPECT_TRUE(layer); |
| 177 return layer->filters(); |
| 178 } |
| 179 |
| 180 float TestHostClient::GetOpacity(int layer_id, LayerTreeType tree_type) const { |
| 181 TestLayer* layer = FindTestLayer(layer_id, tree_type); |
| 182 EXPECT_TRUE(layer); |
| 183 return layer->opacity(); |
| 184 } |
| 185 |
| 186 gfx::Transform TestHostClient::GetTransform(int layer_id, |
| 187 LayerTreeType tree_type) const { |
| 188 TestLayer* layer = FindTestLayer(layer_id, tree_type); |
| 189 EXPECT_TRUE(layer); |
| 190 return layer->transform(); |
| 191 } |
| 192 |
| 193 gfx::ScrollOffset TestHostClient::GetScrollOffset( |
| 194 int layer_id, |
| 195 LayerTreeType tree_type) const { |
| 196 TestLayer* layer = FindTestLayer(layer_id, tree_type); |
| 197 EXPECT_TRUE(layer); |
| 198 return layer->scroll_offset(); |
| 199 } |
| 200 |
| 201 bool TestHostClient::GetTransformIsAnimating(int layer_id, |
| 202 LayerTreeType tree_type) const { |
| 203 TestLayer* layer = FindTestLayer(layer_id, tree_type); |
| 204 EXPECT_TRUE(layer); |
| 205 return layer->transform_is_animating(); |
| 206 } |
| 207 |
| 139 void TestHostClient::ExpectFilterPropertyMutated(int layer_id, | 208 void TestHostClient::ExpectFilterPropertyMutated(int layer_id, |
| 140 LayerTreeType tree_type, | 209 LayerTreeType tree_type, |
| 141 float brightness) const { | 210 float brightness) const { |
| 142 TestLayer* layer = FindTestLayer(layer_id, tree_type); | 211 TestLayer* layer = FindTestLayer(layer_id, tree_type); |
| 143 EXPECT_TRUE(layer->is_property_mutated(TargetProperty::OPACITY)); | 212 EXPECT_TRUE(layer); |
| 213 EXPECT_TRUE(layer->is_property_mutated(TargetProperty::FILTER)); |
| 144 EXPECT_EQ(brightness, layer->brightness()); | 214 EXPECT_EQ(brightness, layer->brightness()); |
| 145 } | 215 } |
| 146 | 216 |
| 147 void TestHostClient::ExpectOpacityPropertyMutated(int layer_id, | 217 void TestHostClient::ExpectOpacityPropertyMutated(int layer_id, |
| 148 LayerTreeType tree_type, | 218 LayerTreeType tree_type, |
| 149 float opacity) const { | 219 float opacity) const { |
| 150 TestLayer* layer = FindTestLayer(layer_id, tree_type); | 220 TestLayer* layer = FindTestLayer(layer_id, tree_type); |
| 221 EXPECT_TRUE(layer); |
| 151 EXPECT_TRUE(layer->is_property_mutated(TargetProperty::OPACITY)); | 222 EXPECT_TRUE(layer->is_property_mutated(TargetProperty::OPACITY)); |
| 152 EXPECT_EQ(opacity, layer->opacity()); | 223 EXPECT_EQ(opacity, layer->opacity()); |
| 153 } | 224 } |
| 154 | 225 |
| 155 void TestHostClient::ExpectTransformPropertyMutated(int layer_id, | 226 void TestHostClient::ExpectTransformPropertyMutated(int layer_id, |
| 156 LayerTreeType tree_type, | 227 LayerTreeType tree_type, |
| 157 int transform_x, | 228 int transform_x, |
| 158 int transform_y) const { | 229 int transform_y) const { |
| 159 TestLayer* layer = FindTestLayer(layer_id, tree_type); | 230 TestLayer* layer = FindTestLayer(layer_id, tree_type); |
| 160 EXPECT_TRUE(layer->is_property_mutated(TargetProperty::OPACITY)); | 231 EXPECT_TRUE(layer); |
| 232 EXPECT_TRUE(layer->is_property_mutated(TargetProperty::TRANSFORM)); |
| 161 EXPECT_EQ(transform_x, layer->transform_x()); | 233 EXPECT_EQ(transform_x, layer->transform_x()); |
| 162 EXPECT_EQ(transform_y, layer->transform_y()); | 234 EXPECT_EQ(transform_y, layer->transform_y()); |
| 163 } | 235 } |
| 164 | 236 |
| 165 TestLayer* TestHostClient::FindTestLayer(int layer_id, | 237 TestLayer* TestHostClient::FindTestLayer(int layer_id, |
| 166 LayerTreeType tree_type) const { | 238 LayerTreeType tree_type) const { |
| 167 const LayerIdToTestLayer& layers_in_tree = tree_type == LayerTreeType::ACTIVE | 239 const LayerIdToTestLayer& layers_in_tree = tree_type == LayerTreeType::ACTIVE |
| 168 ? layers_in_active_tree_ | 240 ? layers_in_active_tree_ |
| 169 : layers_in_pending_tree_; | 241 : layers_in_pending_tree_; |
| 170 auto kv = layers_in_tree.find(layer_id); | 242 auto kv = layers_in_tree.find(layer_id); |
| 171 DCHECK(kv != layers_in_tree.end()); | 243 if (kv == layers_in_tree.end()) |
| 244 return nullptr; |
| 245 |
| 172 DCHECK(kv->second); | 246 DCHECK(kv->second); |
| 173 return kv->second.get(); | 247 return kv->second.get(); |
| 174 } | 248 } |
| 175 | 249 |
| 176 TestAnimationDelegate::TestAnimationDelegate() | 250 TestAnimationDelegate::TestAnimationDelegate() |
| 177 : started_(false), finished_(false) { | 251 : started_(false), |
| 178 } | 252 finished_(false), |
| 253 aborted_(false), |
| 254 takeover_(false), |
| 255 start_time_(base::TimeTicks()) {} |
| 179 | 256 |
| 180 void TestAnimationDelegate::NotifyAnimationStarted( | 257 void TestAnimationDelegate::NotifyAnimationStarted( |
| 181 base::TimeTicks monotonic_time, | 258 base::TimeTicks monotonic_time, |
| 182 TargetProperty::Type target_property, | 259 TargetProperty::Type target_property, |
| 183 int group) { | 260 int group) { |
| 184 started_ = true; | 261 started_ = true; |
| 262 start_time_ = monotonic_time; |
| 185 } | 263 } |
| 264 |
| 186 void TestAnimationDelegate::NotifyAnimationFinished( | 265 void TestAnimationDelegate::NotifyAnimationFinished( |
| 187 base::TimeTicks monotonic_time, | 266 base::TimeTicks monotonic_time, |
| 188 TargetProperty::Type target_property, | 267 TargetProperty::Type target_property, |
| 189 int group) { | 268 int group) { |
| 190 finished_ = true; | 269 finished_ = true; |
| 191 } | 270 } |
| 192 | 271 |
| 272 void TestAnimationDelegate::NotifyAnimationAborted( |
| 273 base::TimeTicks monotonic_time, |
| 274 TargetProperty::Type target_property, |
| 275 int group) { |
| 276 aborted_ = true; |
| 277 } |
| 278 |
| 279 void TestAnimationDelegate::NotifyAnimationTakeover( |
| 280 base::TimeTicks monotonic_time, |
| 281 TargetProperty::Type target_property, |
| 282 double animation_start_time, |
| 283 std::unique_ptr<AnimationCurve> curve) { |
| 284 takeover_ = true; |
| 285 } |
| 286 |
| 193 AnimationTimelinesTest::AnimationTimelinesTest() | 287 AnimationTimelinesTest::AnimationTimelinesTest() |
| 194 : client_(ThreadInstance::MAIN), | 288 : client_(ThreadInstance::MAIN), |
| 195 client_impl_(ThreadInstance::IMPL), | 289 client_impl_(ThreadInstance::IMPL), |
| 196 host_(nullptr), | 290 host_(nullptr), |
| 197 host_impl_(nullptr), | 291 host_impl_(nullptr), |
| 198 timeline_id_(AnimationIdProvider::NextTimelineId()), | 292 timeline_id_(AnimationIdProvider::NextTimelineId()), |
| 199 player_id_(AnimationIdProvider::NextPlayerId()), | 293 player_id_(AnimationIdProvider::NextPlayerId()), |
| 200 next_test_layer_id_(0) { | 294 next_test_layer_id_(0) { |
| 201 host_ = client_.host(); | 295 host_ = client_.host(); |
| 202 host_impl_ = client_impl_.host(); | 296 host_impl_ = client_impl_.host(); |
| 203 | 297 |
| 204 layer_id_ = NextTestLayerId(); | 298 layer_id_ = NextTestLayerId(); |
| 205 } | 299 } |
| 206 | 300 |
| 207 AnimationTimelinesTest::~AnimationTimelinesTest() { | 301 AnimationTimelinesTest::~AnimationTimelinesTest() { |
| 208 } | 302 } |
| 209 | 303 |
| 210 void AnimationTimelinesTest::SetUp() { | 304 void AnimationTimelinesTest::SetUp() { |
| 211 timeline_ = AnimationTimeline::Create(timeline_id_); | 305 timeline_ = AnimationTimeline::Create(timeline_id_); |
| 212 player_ = AnimationPlayer::Create(player_id_); | 306 player_ = AnimationPlayer::Create(player_id_); |
| 213 } | 307 } |
| 214 | 308 |
| 215 void AnimationTimelinesTest::TearDown() { | 309 void AnimationTimelinesTest::TearDown() { |
| 216 host_impl_->ClearTimelines(); | 310 host_impl_->ClearTimelines(); |
| 217 host_->ClearTimelines(); | 311 host_->ClearTimelines(); |
| 218 } | 312 } |
| 219 | 313 |
| 314 void AnimationTimelinesTest::CreateTestLayer( |
| 315 bool needs_active_value_observations, |
| 316 bool needs_pending_value_observations) { |
| 317 CreateTestMainLayer(); |
| 318 |
| 319 if (needs_pending_value_observations) |
| 320 CreateTestImplLayer(LayerTreeType::PENDING); |
| 321 if (needs_active_value_observations) |
| 322 CreateTestImplLayer(LayerTreeType::ACTIVE); |
| 323 } |
| 324 |
| 325 void AnimationTimelinesTest::CreateTestMainLayer() { |
| 326 client_.RegisterLayer(layer_id_, LayerTreeType::ACTIVE); |
| 327 } |
| 328 |
| 329 void AnimationTimelinesTest::CreateTestImplLayer( |
| 330 LayerTreeType layer_tree_type) { |
| 331 client_impl_.RegisterLayer(layer_id_, layer_tree_type); |
| 332 } |
| 333 |
| 334 void AnimationTimelinesTest::AttachTimelinePlayerLayer() { |
| 335 host_->AddAnimationTimeline(timeline_); |
| 336 timeline_->AttachPlayer(player_); |
| 337 player_->AttachLayer(layer_id_); |
| 338 } |
| 339 |
| 340 void AnimationTimelinesTest::CreateImplTimelineAndPlayer() { |
| 341 host_->PushPropertiesTo(host_impl_); |
| 342 GetImplTimelineAndPlayerByID(); |
| 343 } |
| 344 |
| 345 scoped_refptr<ElementAnimations> AnimationTimelinesTest::element_animations() |
| 346 const { |
| 347 DCHECK(player_); |
| 348 DCHECK(player_->element_animations()); |
| 349 return player_->element_animations(); |
| 350 } |
| 351 |
| 352 scoped_refptr<ElementAnimations> |
| 353 AnimationTimelinesTest::element_animations_impl() const { |
| 354 DCHECK(player_impl_); |
| 355 DCHECK(player_impl_->element_animations()); |
| 356 return player_impl_->element_animations(); |
| 357 } |
| 358 |
| 220 void AnimationTimelinesTest::GetImplTimelineAndPlayerByID() { | 359 void AnimationTimelinesTest::GetImplTimelineAndPlayerByID() { |
| 221 timeline_impl_ = host_impl_->GetTimelineById(timeline_id_); | 360 timeline_impl_ = host_impl_->GetTimelineById(timeline_id_); |
| 222 EXPECT_TRUE(timeline_impl_); | 361 EXPECT_TRUE(timeline_impl_); |
| 223 player_impl_ = timeline_impl_->GetPlayerById(player_id_); | 362 player_impl_ = timeline_impl_->GetPlayerById(player_id_); |
| 224 EXPECT_TRUE(player_impl_); | 363 EXPECT_TRUE(player_impl_); |
| 225 } | 364 } |
| 226 | 365 |
| 227 void AnimationTimelinesTest::ReleaseRefPtrs() { | 366 void AnimationTimelinesTest::ReleaseRefPtrs() { |
| 228 player_ = nullptr; | 367 player_ = nullptr; |
| 229 timeline_ = nullptr; | 368 timeline_ = nullptr; |
| (...skipping 28 matching lines...) Expand all Loading... |
| 258 return element_animations ? element_animations->players_list().head()->value() | 397 return element_animations ? element_animations->players_list().head()->value() |
| 259 : nullptr; | 398 : nullptr; |
| 260 } | 399 } |
| 261 | 400 |
| 262 int AnimationTimelinesTest::NextTestLayerId() { | 401 int AnimationTimelinesTest::NextTestLayerId() { |
| 263 next_test_layer_id_++; | 402 next_test_layer_id_++; |
| 264 return next_test_layer_id_; | 403 return next_test_layer_id_; |
| 265 } | 404 } |
| 266 | 405 |
| 267 } // namespace cc | 406 } // namespace cc |
| OLD | NEW |