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

Side by Side Diff: cc/test/layer_test_common.h

Issue 2035863003: cc: Add mask and replica layer ids to the effect tree (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review comments Created 4 years, 6 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/proto/property_tree.proto ('k') | cc/trees/damage_tracker.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 #ifndef CC_TEST_LAYER_TEST_COMMON_H_ 5 #ifndef CC_TEST_LAYER_TEST_COMMON_H_
6 #define CC_TEST_LAYER_TEST_COMMON_H_ 6 #define CC_TEST_LAYER_TEST_COMMON_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 T* ptr = layer.get(); 72 T* ptr = layer.get();
73 parent->AddChild(std::move(layer)); 73 parent->AddChild(std::move(layer));
74 return ptr; 74 return ptr;
75 } 75 }
76 76
77 template <typename T> 77 template <typename T>
78 T* AddReplicaLayer(LayerImpl* origin) { 78 T* AddReplicaLayer(LayerImpl* origin) {
79 std::unique_ptr<T> layer = 79 std::unique_ptr<T> layer =
80 T::Create(host_->host_impl()->active_tree(), layer_impl_id_++); 80 T::Create(host_->host_impl()->active_tree(), layer_impl_id_++);
81 T* ptr = layer.get(); 81 T* ptr = layer.get();
82 origin->SetReplicaLayer(std::move(layer)); 82 origin->test_properties()->SetReplicaLayer(std::move(layer));
83 return ptr; 83 return ptr;
84 } 84 }
85 85
86 template <typename T, typename A> 86 template <typename T, typename A>
87 T* AddChildToRoot(const A& a) { 87 T* AddChildToRoot(const A& a) {
88 std::unique_ptr<T> layer = 88 std::unique_ptr<T> layer =
89 T::Create(host_->host_impl()->active_tree(), layer_impl_id_++, a); 89 T::Create(host_->host_impl()->active_tree(), layer_impl_id_++, a);
90 T* ptr = layer.get(); 90 T* ptr = layer.get();
91 root_layer()->AddChild(std::move(layer)); 91 root_layer()->AddChild(std::move(layer));
92 return ptr; 92 return ptr;
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 std::unique_ptr<RenderPass> render_pass_; 165 std::unique_ptr<RenderPass> render_pass_;
166 scoped_refptr<AnimationTimeline> timeline_; 166 scoped_refptr<AnimationTimeline> timeline_;
167 scoped_refptr<AnimationTimeline> timeline_impl_; 167 scoped_refptr<AnimationTimeline> timeline_impl_;
168 int layer_impl_id_; 168 int layer_impl_id_;
169 }; 169 };
170 }; 170 };
171 171
172 } // namespace cc 172 } // namespace cc
173 173
174 #endif // CC_TEST_LAYER_TEST_COMMON_H_ 174 #endif // CC_TEST_LAYER_TEST_COMMON_H_
OLDNEW
« no previous file with comments | « cc/proto/property_tree.proto ('k') | cc/trees/damage_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698