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

Unified Diff: cc/layers/layer_iterator_unittest.cc

Issue 1122393003: CC: Plumb LayerSettings parameter for cc::Layer construction. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 7 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/layer.cc ('k') | cc/layers/layer_perftest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/layer_iterator_unittest.cc
diff --git a/cc/layers/layer_iterator_unittest.cc b/cc/layers/layer_iterator_unittest.cc
index cdc14732b8ffb94f892fa514e8aeb10bdadbf701..b53daee7bfe6e28d13a80fe8dbe4e26f3b00d9d8 100644
--- a/cc/layers/layer_iterator_unittest.cc
+++ b/cc/layers/layer_iterator_unittest.cc
@@ -23,8 +23,8 @@ namespace {
class TestLayer : public Layer {
public:
- static scoped_refptr<TestLayer> Create() {
- return make_scoped_refptr(new TestLayer());
+ static scoped_refptr<TestLayer> Create(const LayerSettings& settings) {
+ return make_scoped_refptr(new TestLayer(settings));
}
int count_representing_target_surface_;
@@ -35,7 +35,8 @@ class TestLayer : public Layer {
void set_draws_content(bool draws_content) { draws_content_ = draws_content; }
private:
- TestLayer() : Layer(), draws_content_(true) {
+ explicit TestLayer(const LayerSettings& settings)
+ : Layer(settings), draws_content_(true) {
SetBounds(gfx::Size(100, 100));
SetPosition(gfx::Point());
}
@@ -100,11 +101,12 @@ TEST(LayerIteratorTest, EmptyTree) {
}
TEST(LayerIteratorTest, SimpleTree) {
- scoped_refptr<TestLayer> root_layer = TestLayer::Create();
- scoped_refptr<TestLayer> first = TestLayer::Create();
- scoped_refptr<TestLayer> second = TestLayer::Create();
- scoped_refptr<TestLayer> third = TestLayer::Create();
- scoped_refptr<TestLayer> fourth = TestLayer::Create();
+ LayerSettings settings;
+ scoped_refptr<TestLayer> root_layer = TestLayer::Create(settings);
+ scoped_refptr<TestLayer> first = TestLayer::Create(settings);
+ scoped_refptr<TestLayer> second = TestLayer::Create(settings);
+ scoped_refptr<TestLayer> third = TestLayer::Create(settings);
+ scoped_refptr<TestLayer> fourth = TestLayer::Create(settings);
root_layer->AddChild(first);
root_layer->AddChild(second);
@@ -129,15 +131,16 @@ TEST(LayerIteratorTest, SimpleTree) {
}
TEST(LayerIteratorTest, ComplexTree) {
- scoped_refptr<TestLayer> root_layer = TestLayer::Create();
- scoped_refptr<TestLayer> root1 = TestLayer::Create();
- scoped_refptr<TestLayer> root2 = TestLayer::Create();
- scoped_refptr<TestLayer> root3 = TestLayer::Create();
- scoped_refptr<TestLayer> root21 = TestLayer::Create();
- scoped_refptr<TestLayer> root22 = TestLayer::Create();
- scoped_refptr<TestLayer> root23 = TestLayer::Create();
- scoped_refptr<TestLayer> root221 = TestLayer::Create();
- scoped_refptr<TestLayer> root231 = TestLayer::Create();
+ LayerSettings settings;
+ scoped_refptr<TestLayer> root_layer = TestLayer::Create(settings);
+ scoped_refptr<TestLayer> root1 = TestLayer::Create(settings);
+ scoped_refptr<TestLayer> root2 = TestLayer::Create(settings);
+ scoped_refptr<TestLayer> root3 = TestLayer::Create(settings);
+ scoped_refptr<TestLayer> root21 = TestLayer::Create(settings);
+ scoped_refptr<TestLayer> root22 = TestLayer::Create(settings);
+ scoped_refptr<TestLayer> root23 = TestLayer::Create(settings);
+ scoped_refptr<TestLayer> root221 = TestLayer::Create(settings);
+ scoped_refptr<TestLayer> root231 = TestLayer::Create(settings);
root_layer->AddChild(root1);
root_layer->AddChild(root2);
@@ -170,15 +173,16 @@ TEST(LayerIteratorTest, ComplexTree) {
}
TEST(LayerIteratorTest, ComplexTreeMultiSurface) {
- scoped_refptr<TestLayer> root_layer = TestLayer::Create();
- scoped_refptr<TestLayer> root1 = TestLayer::Create();
- scoped_refptr<TestLayer> root2 = TestLayer::Create();
- scoped_refptr<TestLayer> root3 = TestLayer::Create();
- scoped_refptr<TestLayer> root21 = TestLayer::Create();
- scoped_refptr<TestLayer> root22 = TestLayer::Create();
- scoped_refptr<TestLayer> root23 = TestLayer::Create();
- scoped_refptr<TestLayer> root221 = TestLayer::Create();
- scoped_refptr<TestLayer> root231 = TestLayer::Create();
+ LayerSettings settings;
+ scoped_refptr<TestLayer> root_layer = TestLayer::Create(settings);
+ scoped_refptr<TestLayer> root1 = TestLayer::Create(settings);
+ scoped_refptr<TestLayer> root2 = TestLayer::Create(settings);
+ scoped_refptr<TestLayer> root3 = TestLayer::Create(settings);
+ scoped_refptr<TestLayer> root21 = TestLayer::Create(settings);
+ scoped_refptr<TestLayer> root22 = TestLayer::Create(settings);
+ scoped_refptr<TestLayer> root23 = TestLayer::Create(settings);
+ scoped_refptr<TestLayer> root221 = TestLayer::Create(settings);
+ scoped_refptr<TestLayer> root231 = TestLayer::Create(settings);
root_layer->AddChild(root1);
root_layer->AddChild(root2);
« no previous file with comments | « cc/layers/layer.cc ('k') | cc/layers/layer_perftest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698