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

Unified Diff: cc/test/layer_test_common.h

Issue 388643002: Rotation into Video Layer + Content Transform (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed android webmediaplayer Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/layers/video_layer_impl_unittest.cc ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('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 3b967ec58033ca2442acc2f39eec3b0b77e035a0..e74ea6d131d1b228ff998717f1d6746af4f7b940 100644
--- a/cc/test/layer_test_common.h
+++ b/cc/test/layer_test_common.h
@@ -69,6 +69,15 @@ class LayerTestCommon {
return ptr;
}
+ template <typename T, typename A, typename B>
+ T* AddChildToRoot(const A& a, const B& b) {
+ scoped_ptr<T> layer =
+ T::Create(host_->host_impl()->active_tree(), 2, a, b);
+ T* ptr = layer.get();
+ root_layer_impl_->AddChild(layer.template PassAs<LayerImpl>());
+ return ptr;
+ }
+
template <typename T, typename A, typename B, typename C, typename D>
T* AddChildToRoot(const A& a, const B& b, const C& c, const D& d) {
scoped_ptr<T> layer =
« no previous file with comments | « cc/layers/video_layer_impl_unittest.cc ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698