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

Unified Diff: cc/test/layer_test_common.h

Issue 234603002: Add support for setting TrackStart on solid color layers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix more unit test compile Created 6 years, 8 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
Index: cc/test/layer_test_common.h
diff --git a/cc/test/layer_test_common.h b/cc/test/layer_test_common.h
index cb5641750329760c6dd3ba21277937fab0b566be..92c671cf914516ba7cff3b52afc1f76b7425b082 100644
--- a/cc/test/layer_test_common.h
+++ b/cc/test/layer_test_common.h
@@ -75,6 +75,24 @@ class LayerTestCommon {
return ptr;
}
+ template <typename T,
+ typename A,
+ typename B,
+ typename C,
+ typename D,
+ typename E>
+ T* AddChildToRoot(const A& a,
+ const B& b,
+ const C& c,
+ const D& d,
+ const E& e) {
+ scoped_ptr<T> layer =
+ T::Create(host_->host_impl()->active_tree(), 2, a, b, c, d, e);
+ T* ptr = layer.get();
+ root_layer_impl_->AddChild(layer.template PassAs<LayerImpl>());
+ return ptr;
+ }
+
void CalcDrawProps(const gfx::Size& viewport_size);
void AppendQuadsWithOcclusion(LayerImpl* layer_impl,
const gfx::Rect& occluded);

Powered by Google App Engine
This is Rietveld 408576698