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

Unified Diff: cc/trees/layer_tree_host_unittest_picture.cc

Issue 1101823002: CC Animations: Make LayerAnimationController creation optional (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Plumb LayerSettings parameter for cc::Layer construction. 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
Index: cc/trees/layer_tree_host_unittest_picture.cc
diff --git a/cc/trees/layer_tree_host_unittest_picture.cc b/cc/trees/layer_tree_host_unittest_picture.cc
index 7d3d5254f4f0d7a25331d78462ae8562a32bd499..be7087933e062f496e1f28a941188d338f5c8c54 100644
--- a/cc/trees/layer_tree_host_unittest_picture.cc
+++ b/cc/trees/layer_tree_host_unittest_picture.cc
@@ -17,10 +17,10 @@ namespace {
class LayerTreeHostPictureTest : public LayerTreeTest {
protected:
void SetupTreeWithSinglePictureLayer(const gfx::Size& size) {
- scoped_refptr<Layer> root = Layer::Create();
+ scoped_refptr<Layer> root = Layer::Create(layer_settings());
root->SetBounds(size);
- root_picture_layer_ = FakePictureLayer::Create(&client_);
+ root_picture_layer_ = FakePictureLayer::Create(layer_settings(), &client_);
root_picture_layer_->SetBounds(size);
root->AddChild(root_picture_layer_);
@@ -57,7 +57,7 @@ class LayerTreeHostPictureTestTwinLayer
// Add a new picture layer so the activate will have a pending layer
// without an active twin.
scoped_refptr<FakePictureLayer> picture =
- FakePictureLayer::Create(&client_);
+ FakePictureLayer::Create(layer_settings(), &client_);
layer_tree_host()->root_layer()->AddChild(picture);
break;
}
@@ -145,11 +145,11 @@ class LayerTreeHostPictureTestResizeViewportWithGpuRaster
}
void SetupTree() override {
- scoped_refptr<Layer> root = Layer::Create();
+ scoped_refptr<Layer> root = Layer::Create(layer_settings());
root->SetBounds(gfx::Size(768, 960));
client_.set_fill_with_nonsolid_color(true);
- picture_ = FakePictureLayer::Create(&client_);
+ picture_ = FakePictureLayer::Create(layer_settings(), &client_);
picture_->SetBounds(gfx::Size(768, 960));
root->AddChild(picture_);
@@ -208,13 +208,13 @@ class LayerTreeHostPictureTestChangeLiveTilesRectWithRecycleTree
frame_ = 0;
did_post_commit_ = false;
- scoped_refptr<Layer> root = Layer::Create();
+ scoped_refptr<Layer> root = Layer::Create(layer_settings());
root->SetBounds(gfx::Size(100, 100));
// The layer is big enough that the live tiles rect won't cover the full
// layer.
client_.set_fill_with_nonsolid_color(true);
- picture_ = FakePictureLayer::Create(&client_);
+ picture_ = FakePictureLayer::Create(layer_settings(), &client_);
picture_->SetBounds(gfx::Size(100, 100000));
root->AddChild(picture_);
@@ -331,15 +331,15 @@ MULTI_THREAD_IMPL_TEST_F(
class LayerTreeHostPictureTestRSLLMembership : public LayerTreeHostPictureTest {
void SetupTree() override {
- scoped_refptr<Layer> root = Layer::Create();
+ scoped_refptr<Layer> root = Layer::Create(layer_settings());
root->SetBounds(gfx::Size(100, 100));
- child_ = Layer::Create();
+ child_ = Layer::Create(layer_settings());
root->AddChild(child_);
// Don't be solid color so the layer has tilings/tiles.
client_.set_fill_with_nonsolid_color(true);
- picture_ = FakePictureLayer::Create(&client_);
+ picture_ = FakePictureLayer::Create(layer_settings(), &client_);
picture_->SetBounds(gfx::Size(100, 100));
child_->AddChild(picture_);
@@ -420,10 +420,10 @@ SINGLE_AND_MULTI_THREAD_IMPL_TEST_F(LayerTreeHostPictureTestRSLLMembership);
class LayerTreeHostPictureTestRSLLMembershipWithScale
: public LayerTreeHostPictureTest {
void SetupTree() override {
- scoped_refptr<Layer> root = Layer::Create();
+ scoped_refptr<Layer> root = Layer::Create(layer_settings());
root->SetBounds(gfx::Size(100, 100));
- pinch_ = Layer::Create();
+ pinch_ = Layer::Create(layer_settings());
pinch_->SetBounds(gfx::Size(500, 500));
pinch_->SetScrollClipLayerId(root->id());
pinch_->SetIsContainerForFixedPositionLayers(true);
@@ -431,7 +431,7 @@ class LayerTreeHostPictureTestRSLLMembershipWithScale
// Don't be solid color so the layer has tilings/tiles.
client_.set_fill_with_nonsolid_color(true);
- picture_ = FakePictureLayer::Create(&client_);
+ picture_ = FakePictureLayer::Create(layer_settings(), &client_);
picture_->SetBounds(gfx::Size(100, 100));
pinch_->AddChild(picture_);

Powered by Google App Engine
This is Rietveld 408576698