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

Unified Diff: cc/test/layer_test_common.h

Issue 1491033002: Create RenderSurface on Effect Tree (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@alwayspt
Patch Set: fix for crash Created 5 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/layers/video_layer_impl_unittest.cc ('k') | cc/test/layer_tree_host_common_test.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/layer_test_common.h
diff --git a/cc/test/layer_test_common.h b/cc/test/layer_test_common.h
index 85f2f8a836afc1d980ae859457933adccd210598..4301a30212030ed243d7c9862ffb206ebc481ac2 100644
--- a/cc/test/layer_test_common.h
+++ b/cc/test/layer_test_common.h
@@ -70,6 +70,15 @@ class LayerTestCommon {
return ptr;
}
+ template <typename T>
+ T* AddReplicaLayer(LayerImpl* origin) {
+ scoped_ptr<T> layer =
+ T::Create(host_->host_impl()->active_tree(), layer_impl_id_++);
+ T* ptr = layer.get();
+ origin->SetReplicaLayer(layer.Pass());
+ return ptr;
+ }
+
template <typename T, typename A>
T* AddChildToRoot(const A& a) {
scoped_ptr<T> layer =
« no previous file with comments | « cc/layers/video_layer_impl_unittest.cc ('k') | cc/test/layer_tree_host_common_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698