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

Side by Side Diff: cc/layers/layer_utils_unittest.cc

Issue 1801853002: Transfer LayerImpl ownership to LayerTreeImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more asan. Created 4 years, 9 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/layers/layer_unittest.cc ('k') | cc/layers/picture_layer_impl_perftest.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/layers/layer_utils.h" 5 #include "cc/layers/layer_utils.h"
6 6
7 #include "cc/animation/animation_host.h" 7 #include "cc/animation/animation_host.h"
8 #include "cc/animation/animation_id_provider.h" 8 #include "cc/animation/animation_id_provider.h"
9 #include "cc/animation/transform_operations.h" 9 #include "cc/animation/transform_operations.h"
10 #include "cc/layers/layer_impl.h" 10 #include "cc/layers/layer_impl.h"
(...skipping 14 matching lines...) Expand all
25 return std::sqrt(width * width + height * height); 25 return std::sqrt(width * width + height * height);
26 } 26 }
27 27
28 class LayerUtilsGetAnimationBoundsTest : public testing::Test { 28 class LayerUtilsGetAnimationBoundsTest : public testing::Test {
29 public: 29 public:
30 LayerUtilsGetAnimationBoundsTest() 30 LayerUtilsGetAnimationBoundsTest()
31 : host_impl_(&task_runner_provider_, 31 : host_impl_(&task_runner_provider_,
32 &shared_bitmap_manager_, 32 &shared_bitmap_manager_,
33 &task_graph_runner_), 33 &task_graph_runner_),
34 root_(CreateTwoForkTree(&host_impl_)), 34 root_(CreateTwoForkTree(&host_impl_)),
35 parent1_(root_->children()[0].get()), 35 parent1_(root_->children()[0]),
36 parent2_(root_->children()[1].get()), 36 parent2_(root_->children()[1]),
37 child1_(parent1_->children()[0].get()), 37 child1_(parent1_->children()[0]),
38 child2_(parent2_->children()[0].get()), 38 child2_(parent2_->children()[0]),
39 grand_child_(child2_->children()[0].get()), 39 grand_child_(child2_->children()[0]),
40 great_grand_child_(grand_child_->children()[0].get()) { 40 great_grand_child_(grand_child_->children()[0]) {
41 timeline_ = 41 timeline_ =
42 AnimationTimeline::Create(AnimationIdProvider::NextTimelineId()); 42 AnimationTimeline::Create(AnimationIdProvider::NextTimelineId());
43 host_impl_.animation_host()->AddAnimationTimeline(timeline_); 43 host_impl_.animation_host()->AddAnimationTimeline(timeline_);
44 } 44 }
45 45
46 LayerImpl* root() { return root_; } 46 LayerImpl* root() { return root_; }
47 LayerImpl* parent1() { return parent1_; } 47 LayerImpl* parent1() { return parent1_; }
48 LayerImpl* child1() { return child1_; } 48 LayerImpl* child1() { return child1_; }
49 LayerImpl* parent2() { return parent2_; } 49 LayerImpl* parent2() { return parent2_; }
50 LayerImpl* child2() { return child2_; } 50 LayerImpl* child2() { return child2_; }
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after
561 // Same as RotateXWithPerspectiveUnderAncestorsWithPositionOr2DTransform test, 561 // Same as RotateXWithPerspectiveUnderAncestorsWithPositionOr2DTransform test,
562 // except for the perspective calculations. 562 // except for the perspective calculations.
563 563
564 gfx::BoxF expected(295.f, 180.f, -25.f, 50.f, 50.f, 50.f); 564 gfx::BoxF expected(295.f, 180.f, -25.f, 50.f, 50.f, 50.f);
565 EXPECT_BOXF_EQ(expected, box); 565 EXPECT_BOXF_EQ(expected, box);
566 } 566 }
567 567
568 } // namespace 568 } // namespace
569 569
570 } // namespace cc 570 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/layer_unittest.cc ('k') | cc/layers/picture_layer_impl_perftest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698