Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(219)

Side by Side Diff: cc/trees/layer_tree_host_unittest_animation.cc

Issue 2860293002: Change cc::ElementId to be a uint64_t (Closed)
Patch Set: Merge branch 'master' into secondaryid Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/trees/layer_tree_host_unittest.cc ('k') | cc/trees/tree_synchronizer_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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.h" 5 #include "cc/trees/layer_tree_host.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <climits> 8 #include <climits>
9 9
10 #include "cc/animation/animation_curve.h" 10 #include "cc/animation/animation_curve.h"
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after
483 class LayerTreeHostAnimationTestLayerAddedWithAnimation 483 class LayerTreeHostAnimationTestLayerAddedWithAnimation
484 : public LayerTreeHostAnimationTest { 484 : public LayerTreeHostAnimationTest {
485 public: 485 public:
486 void BeginTest() override { PostSetNeedsCommitToMainThread(); } 486 void BeginTest() override { PostSetNeedsCommitToMainThread(); }
487 487
488 void DidCommit() override { 488 void DidCommit() override {
489 if (layer_tree_host()->SourceFrameNumber() == 1) { 489 if (layer_tree_host()->SourceFrameNumber() == 1) {
490 AttachPlayersToTimeline(); 490 AttachPlayersToTimeline();
491 491
492 scoped_refptr<Layer> layer = Layer::Create(); 492 scoped_refptr<Layer> layer = Layer::Create();
493 layer->SetElementId(ElementId(42, 0)); 493 layer->SetElementId(ElementId(42));
494 player_->AttachElement(layer->element_id()); 494 player_->AttachElement(layer->element_id());
495 player_->set_animation_delegate(this); 495 player_->set_animation_delegate(this);
496 496
497 // Any valid AnimationCurve will do here. 497 // Any valid AnimationCurve will do here.
498 std::unique_ptr<AnimationCurve> curve(new FakeFloatAnimationCurve()); 498 std::unique_ptr<AnimationCurve> curve(new FakeFloatAnimationCurve());
499 std::unique_ptr<Animation> animation( 499 std::unique_ptr<Animation> animation(
500 Animation::Create(std::move(curve), 1, 1, TargetProperty::OPACITY)); 500 Animation::Create(std::move(curve), 1, 1, TargetProperty::OPACITY));
501 player_->AddAnimation(std::move(animation)); 501 player_->AddAnimation(std::move(animation));
502 502
503 // We add the animation *before* attaching the layer to the tree. 503 // We add the animation *before* attaching the layer to the tree.
(...skipping 1463 matching lines...) Expand 10 before | Expand all | Expand 10 after
1967 private: 1967 private:
1968 scoped_refptr<Layer> layer_; 1968 scoped_refptr<Layer> layer_;
1969 FakeContentLayerClient client_; 1969 FakeContentLayerClient client_;
1970 }; 1970 };
1971 1971
1972 MULTI_THREAD_TEST_F( 1972 MULTI_THREAD_TEST_F(
1973 LayerTreeHostAnimationTestRebuildPropertyTreesOnAnimationSetNeedsCommit); 1973 LayerTreeHostAnimationTestRebuildPropertyTreesOnAnimationSetNeedsCommit);
1974 1974
1975 } // namespace 1975 } // namespace
1976 } // namespace cc 1976 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_unittest.cc ('k') | cc/trees/tree_synchronizer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698