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

Unified Diff: cc/trees/layer_tree_host_unittest.cc

Issue 1783613004: CC Animation: Erase cc::LayerSettings everywhere. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@eraseandroid
Patch Set: Rebase. Created 4 years, 9 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.cc
diff --git a/cc/trees/layer_tree_host_unittest.cc b/cc/trees/layer_tree_host_unittest.cc
index a4fff259e61692dd4a1c3f7868aeff1509f0db78..e35855ef6f63af2e6e5bc071405e3674956f7ce9 100644
--- a/cc/trees/layer_tree_host_unittest.cc
+++ b/cc/trees/layer_tree_host_unittest.cc
@@ -260,7 +260,7 @@ class LayerTreeHostTestReadyToActivateNonEmpty
void SetupTree() override {
client_.set_fill_with_nonsolid_color(true);
scoped_refptr<FakePictureLayer> root_layer =
- FakePictureLayer::Create(layer_settings(), &client_);
+ FakePictureLayer::Create(&client_);
root_layer->SetBounds(gfx::Size(1024, 1024));
root_layer->SetIsDrawable(true);
@@ -331,7 +331,7 @@ class LayerTreeHostTestReadyToDrawNonEmpty
void SetupTree() override {
client_.set_fill_with_nonsolid_color(true);
scoped_refptr<FakePictureLayer> root_layer =
- FakePictureLayer::Create(layer_settings(), &client_);
+ FakePictureLayer::Create(&client_);
root_layer->SetBounds(gfx::Size(1024, 1024));
root_layer->SetIsDrawable(true);
@@ -369,7 +369,7 @@ class LayerTreeHostTestReadyToDrawVisibility : public LayerTreeHostTest {
void SetupTree() override {
client_.set_fill_with_nonsolid_color(true);
scoped_refptr<FakePictureLayer> root_layer =
- FakePictureLayer::Create(layer_settings(), &client_);
+ FakePictureLayer::Create(&client_);
root_layer->SetBounds(gfx::Size(1024, 1024));
client_.set_bounds(root_layer->bounds());
root_layer->SetIsDrawable(true);
@@ -598,7 +598,7 @@ MULTI_THREAD_TEST_F(LayerTreeHostTestSetNeedsCommit2);
class LayerTreeHostTestPushPropertiesTo : public LayerTreeHostTest {
protected:
void SetupTree() override {
- scoped_refptr<Layer> root = Layer::Create(layer_settings());
+ scoped_refptr<Layer> root = Layer::Create();
root->SetBounds(gfx::Size(10, 10));
layer_tree_host()->SetRootLayer(root);
LayerTreeHostTest::SetupTree();
@@ -691,7 +691,7 @@ SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostTestPushPropertiesTo);
class LayerTreeHostTestPropertyTreesChangedSync : public LayerTreeHostTest {
protected:
void SetupTree() override {
- scoped_refptr<Layer> root = Layer::Create(layer_settings());
+ scoped_refptr<Layer> root = Layer::Create();
layer_tree_host()->SetRootLayer(root);
LayerTreeHostTest::SetupTree();
}
@@ -799,7 +799,7 @@ class LayerTreeHostTestSetNeedsRedrawRect : public LayerTreeHostTest {
: num_draws_(0), bounds_(50, 50), invalid_rect_(10, 10, 20, 20) {}
void BeginTest() override {
- root_layer_ = FakePictureLayer::Create(layer_settings(), &client_);
+ root_layer_ = FakePictureLayer::Create(&client_);
root_layer_->SetIsDrawable(true);
root_layer_->SetBounds(bounds_);
layer_tree_host()->SetRootLayer(root_layer_);
@@ -858,7 +858,7 @@ class LayerTreeHostTestGpuRasterDeviceSizeChanged : public LayerTreeHostTest {
void BeginTest() override {
client_.set_fill_with_nonsolid_color(true);
- root_layer_ = FakePictureLayer::Create(layer_settings(), &client_);
+ root_layer_ = FakePictureLayer::Create(&client_);
root_layer_->SetIsDrawable(true);
gfx::Transform transform;
// Translate the layer out of the viewport to force it to not update its
@@ -936,10 +936,10 @@ class LayerTreeHostTestNoExtraCommitFromInvalidate : public LayerTreeHostTest {
}
void SetupTree() override {
- root_layer_ = Layer::Create(layer_settings());
+ root_layer_ = Layer::Create();
root_layer_->SetBounds(gfx::Size(10, 20));
- scaled_layer_ = FakePictureLayer::Create(layer_settings(), &client_);
+ scaled_layer_ = FakePictureLayer::Create(&client_);
scaled_layer_->SetBounds(gfx::Size(1, 1));
root_layer_->AddChild(scaled_layer_);
@@ -987,13 +987,13 @@ class LayerTreeHostTestNoExtraCommitFromScrollbarInvalidate
}
void SetupTree() override {
- root_layer_ = Layer::Create(layer_settings());
+ root_layer_ = Layer::Create();
root_layer_->SetBounds(gfx::Size(10, 20));
bool paint_scrollbar = true;
bool has_thumb = false;
- scrollbar_ = FakePaintedScrollbarLayer::Create(
- layer_settings(), paint_scrollbar, has_thumb, root_layer_->id());
+ scrollbar_ = FakePaintedScrollbarLayer::Create(paint_scrollbar, has_thumb,
+ root_layer_->id());
scrollbar_->SetPosition(gfx::PointF(0.f, 10.f));
scrollbar_->SetBounds(gfx::Size(10, 10));
@@ -1045,10 +1045,10 @@ class LayerTreeHostTestDeviceScaleFactorChange : public LayerTreeHostTest {
}
void SetupTree() override {
- root_layer_ = Layer::Create(layer_settings());
+ root_layer_ = Layer::Create();
root_layer_->SetBounds(gfx::Size(10, 20));
- child_layer_ = FakePictureLayer::Create(layer_settings(), &client_);
+ child_layer_ = FakePictureLayer::Create(&client_);
child_layer_->SetBounds(gfx::Size(10, 10));
root_layer_->AddChild(child_layer_);
@@ -1108,7 +1108,7 @@ class LayerTreeHostTestSetNextCommitForcesRedraw : public LayerTreeHostTest {
: num_draws_(0), bounds_(50, 50), invalid_rect_(10, 10, 20, 20) {}
void BeginTest() override {
- root_layer_ = FakePictureLayer::Create(layer_settings(), &client_);
+ root_layer_ = FakePictureLayer::Create(&client_);
root_layer_->SetIsDrawable(true);
root_layer_->SetBounds(bounds_);
layer_tree_host()->SetRootLayer(root_layer_);
@@ -1201,19 +1201,19 @@ class LayerTreeHostTestUndrawnLayersDamageLater : public LayerTreeHostTest {
}
void SetupTree() override {
- root_layer_ = FakePictureLayer::Create(layer_settings(), &client_);
+ root_layer_ = FakePictureLayer::Create(&client_);
root_layer_->SetIsDrawable(true);
root_layer_->SetBounds(gfx::Size(50, 50));
layer_tree_host()->SetRootLayer(root_layer_);
// The initially transparent layer has a larger child layer, which is
// not initially drawn because of the this (parent) layer.
- parent_layer_ = FakePictureLayer::Create(layer_settings(), &client_);
+ parent_layer_ = FakePictureLayer::Create(&client_);
parent_layer_->SetBounds(gfx::Size(15, 15));
parent_layer_->SetOpacity(0.0f);
root_layer_->AddChild(parent_layer_);
- child_layer_ = FakePictureLayer::Create(layer_settings(), &client_);
+ child_layer_ = FakePictureLayer::Create(&client_);
child_layer_->SetBounds(gfx::Size(25, 25));
parent_layer_->AddChild(child_layer_);
client_.set_bounds(root_layer_->bounds());
@@ -1298,12 +1298,12 @@ class LayerTreeHostTestDamageWithScale : public LayerTreeHostTest {
scoped_ptr<FakeDisplayListRecordingSource> recording(
new FakeDisplayListRecordingSource);
root_layer_ = FakePictureLayer::CreateWithRecordingSource(
- layer_settings(), &client_, std::move(recording));
+ &client_, std::move(recording));
root_layer_->SetBounds(gfx::Size(50, 50));
recording.reset(new FakeDisplayListRecordingSource);
child_layer_ = FakePictureLayer::CreateWithRecordingSource(
- layer_settings(), &client_, std::move(recording));
+ &client_, std::move(recording));
child_layer_->SetBounds(gfx::Size(25, 25));
child_layer_->SetIsDrawable(true);
child_layer_->SetContentsOpaque(true);
@@ -1546,8 +1546,7 @@ class LayerTreeHostTestStartPageScaleAnimation : public LayerTreeHostTest {
Layer* root_layer = layer_tree_host()->root_layer();
- scoped_refptr<FakePictureLayer> layer =
- FakePictureLayer::Create(layer_settings(), &client_);
+ scoped_refptr<FakePictureLayer> layer = FakePictureLayer::Create(&client_);
layer->set_always_update_resources(true);
scroll_layer_ = layer;
@@ -1555,12 +1554,8 @@ class LayerTreeHostTestStartPageScaleAnimation : public LayerTreeHostTest {
2 * root_layer->bounds().height()));
scroll_layer_->SetScrollOffset(gfx::ScrollOffset());
- CreateVirtualViewportLayers(root_layer,
- scroll_layer_,
- root_layer->bounds(),
- root_layer->bounds(),
- layer_tree_host(),
- layer_settings());
+ CreateVirtualViewportLayers(root_layer, scroll_layer_, root_layer->bounds(),
+ root_layer->bounds(), layer_tree_host());
layer_tree_host()->SetPageScaleFactorAndLimits(1.f, 0.5f, 2.f);
client_.set_bounds(root_layer->bounds());
@@ -1680,8 +1675,8 @@ class LayerTreeHostTestOpacityChange : public LayerTreeHostTest {
void SetupTree() override {
LayerTreeHostTest::SetupTree();
- update_check_picture_layer_ = FakePictureLayer::Create(
- layer_settings(), &test_opacity_change_delegate_);
+ update_check_picture_layer_ =
+ FakePictureLayer::Create(&test_opacity_change_delegate_);
test_opacity_change_delegate_.SetTestLayer(
update_check_picture_layer_.get());
layer_tree_host()->root_layer()->AddChild(update_check_picture_layer_);
@@ -1710,8 +1705,8 @@ class LayerTreeHostTestDeviceScaleFactorScalesViewportAndLayers
void BeginTest() override {
client_.set_fill_with_nonsolid_color(true);
- root_layer_ = FakePictureLayer::Create(layer_settings(), &client_);
- child_layer_ = FakePictureLayer::Create(layer_settings(), &client_);
+ root_layer_ = FakePictureLayer::Create(&client_);
+ child_layer_ = FakePictureLayer::Create(&client_);
layer_tree_host()->SetViewportSize(gfx::Size(60, 60));
layer_tree_host()->SetDeviceScaleFactor(1.5);
@@ -1817,7 +1812,7 @@ class LayerTreeHostTestContinuousInvalidate : public LayerTreeHostTest {
layer_tree_host()->SetViewportSize(gfx::Size(10, 10));
layer_tree_host()->root_layer()->SetBounds(gfx::Size(10, 10));
- layer_ = FakePictureLayer::Create(layer_settings(), &client_);
+ layer_ = FakePictureLayer::Create(&client_);
layer_->SetBounds(gfx::Size(10, 10));
layer_->SetPosition(gfx::PointF(0.f, 0.f));
layer_->SetIsDrawable(true);
@@ -1992,8 +1987,7 @@ class LayerTreeHostTestLCDChange : public LayerTreeHostTest {
void SetupTree() override {
num_tiles_rastered_ = 0;
- scoped_refptr<Layer> root_layer =
- PictureLayer::Create(layer_settings(), &client_);
+ scoped_refptr<Layer> root_layer = PictureLayer::Create(&client_);
client_.set_fill_with_nonsolid_color(true);
root_layer->SetIsDrawable(true);
root_layer->SetBounds(gfx::Size(10, 10));
@@ -2231,8 +2225,7 @@ class LayerTreeHostTestUninvertibleTransformDoesNotBlockActivation
void SetupTree() override {
LayerTreeHostTest::SetupTree();
- scoped_refptr<Layer> layer =
- PictureLayer::Create(layer_settings(), &client_);
+ scoped_refptr<Layer> layer = PictureLayer::Create(&client_);
layer->SetTransform(gfx::Transform(0.0, 0.0, 0.0, 0.0, 0.0, 0.0));
layer->SetBounds(gfx::Size(10, 10));
layer_tree_host()->root_layer()->AddChild(layer);
@@ -2284,8 +2277,7 @@ class LayerTreeHostTestChangeLayerPropertiesInPaintContents
LayerTreeHostTestChangeLayerPropertiesInPaintContents() : num_commits_(0) {}
void SetupTree() override {
- scoped_refptr<PictureLayer> root_layer =
- PictureLayer::Create(layer_settings(), &client_);
+ scoped_refptr<PictureLayer> root_layer = PictureLayer::Create(&client_);
root_layer->SetIsDrawable(true);
root_layer->SetBounds(gfx::Size(1, 1));
client_.set_layer(root_layer.get());
@@ -2367,8 +2359,7 @@ class LayerTreeHostTestIOSurfaceDrawing : public LayerTreeHostTest {
io_surface_id_ = 9;
io_surface_size_ = gfx::Size(6, 7);
- scoped_refptr<IOSurfaceLayer> io_surface_layer =
- IOSurfaceLayer::Create(layer_settings());
+ scoped_refptr<IOSurfaceLayer> io_surface_layer = IOSurfaceLayer::Create();
io_surface_layer->SetBounds(gfx::Size(10, 10));
io_surface_layer->SetIsDrawable(true);
io_surface_layer->SetContentsOpaque(true);
@@ -2514,16 +2505,16 @@ class LayerTreeHostTestResourcelessSoftwareDraw : public LayerTreeHostTest {
}
void SetupTree() override {
- root_layer_ = FakePictureLayer::Create(layer_settings(), &client_);
+ root_layer_ = FakePictureLayer::Create(&client_);
root_layer_->SetIsDrawable(true);
root_layer_->SetBounds(gfx::Size(50, 50));
- parent_layer_ = FakePictureLayer::Create(layer_settings(), &client_);
+ parent_layer_ = FakePictureLayer::Create(&client_);
parent_layer_->SetIsDrawable(true);
parent_layer_->SetBounds(gfx::Size(50, 50));
parent_layer_->SetForceRenderSurface(true);
- child_layer_ = FakePictureLayer::Create(layer_settings(), &client_);
+ child_layer_ = FakePictureLayer::Create(&client_);
child_layer_->SetIsDrawable(true);
child_layer_->SetBounds(gfx::Size(50, 50));
@@ -2742,9 +2733,8 @@ class PushPropertiesCountingLayerImpl : public LayerImpl {
class PushPropertiesCountingLayer : public Layer {
public:
- static scoped_refptr<PushPropertiesCountingLayer> Create(
- const LayerSettings& settings) {
- return new PushPropertiesCountingLayer(settings);
+ static scoped_refptr<PushPropertiesCountingLayer> Create() {
+ return new PushPropertiesCountingLayer();
}
void PushPropertiesTo(LayerImpl* layer) override {
@@ -2771,8 +2761,8 @@ class PushPropertiesCountingLayer : public Layer {
}
private:
- explicit PushPropertiesCountingLayer(const LayerSettings& settings)
- : Layer(settings),
+ PushPropertiesCountingLayer()
+ : Layer(),
push_properties_count_(0),
persist_needs_push_properties_(false) {
SetBounds(gfx::Size(1, 1));
@@ -2797,12 +2787,11 @@ class LayerTreeHostTestLayersPushProperties : public LayerTreeHostTest {
}
void SetupTree() override {
- root_ = PushPropertiesCountingLayer::Create(layer_settings());
- child_ = PushPropertiesCountingLayer::Create(layer_settings());
- child2_ = PushPropertiesCountingLayer::Create(layer_settings());
- grandchild_ = PushPropertiesCountingLayer::Create(layer_settings());
- leaf_always_pushing_layer_ =
- PushPropertiesCountingLayer::Create(layer_settings());
+ root_ = PushPropertiesCountingLayer::Create();
+ child_ = PushPropertiesCountingLayer::Create();
+ child2_ = PushPropertiesCountingLayer::Create();
+ grandchild_ = PushPropertiesCountingLayer::Create();
+ leaf_always_pushing_layer_ = PushPropertiesCountingLayer::Create();
leaf_always_pushing_layer_->set_persist_needs_push_properties(true);
root_->AddChild(child_);
@@ -2810,7 +2799,7 @@ class LayerTreeHostTestLayersPushProperties : public LayerTreeHostTest {
child_->AddChild(grandchild_);
child2_->AddChild(leaf_always_pushing_layer_);
- other_root_ = PushPropertiesCountingLayer::Create(layer_settings());
+ other_root_ = PushPropertiesCountingLayer::Create();
// Don't set the root layer here.
LayerTreeHostTest::SetupTree();
@@ -3191,13 +3180,13 @@ class LayerTreeHostTestPropertyChangesDuringUpdateArePushed
void BeginTest() override { PostSetNeedsCommitToMainThread(); }
void SetupTree() override {
- root_ = Layer::Create(layer_settings());
+ root_ = Layer::Create();
root_->SetBounds(gfx::Size(1, 1));
bool paint_scrollbar = true;
bool has_thumb = false;
scrollbar_layer_ = FakePaintedScrollbarLayer::Create(
- layer_settings(), paint_scrollbar, has_thumb, root_->id());
+ paint_scrollbar, has_thumb, root_->id());
root_->AddChild(scrollbar_layer_);
@@ -3247,8 +3236,8 @@ class LayerTreeHostTestSetDrawableCausesCommit : public LayerTreeHostTest {
void BeginTest() override { PostSetNeedsCommitToMainThread(); }
void SetupTree() override {
- root_ = PushPropertiesCountingLayer::Create(layer_settings());
- child_ = PushPropertiesCountingLayer::Create(layer_settings());
+ root_ = PushPropertiesCountingLayer::Create();
+ child_ = PushPropertiesCountingLayer::Create();
root_->AddChild(child_);
layer_tree_host()->SetRootLayer(root_);
@@ -3308,11 +3297,11 @@ class LayerTreeHostTestCasePushPropertiesThreeGrandChildren
}
void SetupTree() override {
- root_ = PushPropertiesCountingLayer::Create(layer_settings());
- child_ = PushPropertiesCountingLayer::Create(layer_settings());
- grandchild1_ = PushPropertiesCountingLayer::Create(layer_settings());
- grandchild2_ = PushPropertiesCountingLayer::Create(layer_settings());
- grandchild3_ = PushPropertiesCountingLayer::Create(layer_settings());
+ root_ = PushPropertiesCountingLayer::Create();
+ child_ = PushPropertiesCountingLayer::Create();
+ grandchild1_ = PushPropertiesCountingLayer::Create();
+ grandchild2_ = PushPropertiesCountingLayer::Create();
+ grandchild3_ = PushPropertiesCountingLayer::Create();
root_->AddChild(child_);
child_->AddChild(grandchild1_);
@@ -3809,8 +3798,8 @@ class LayerTreeHostTestVideoLayerInvalidate : public LayerInvalidateCausesDraw {
public:
void SetupTree() override {
LayerTreeHostTest::SetupTree();
- scoped_refptr<VideoLayer> video_layer = VideoLayer::Create(
- layer_settings(), &provider_, media::VIDEO_ROTATION_0);
+ scoped_refptr<VideoLayer> video_layer =
+ VideoLayer::Create(&provider_, media::VIDEO_ROTATION_0);
video_layer->SetBounds(gfx::Size(10, 10));
video_layer->SetIsDrawable(true);
layer_tree_host()->root_layer()->AddChild(video_layer);
@@ -3832,8 +3821,7 @@ class LayerTreeHostTestIOSurfaceLayerInvalidate
public:
void SetupTree() override {
LayerTreeHostTest::SetupTree();
- scoped_refptr<IOSurfaceLayer> layer =
- IOSurfaceLayer::Create(layer_settings());
+ scoped_refptr<IOSurfaceLayer> layer = IOSurfaceLayer::Create();
layer->SetBounds(gfx::Size(10, 10));
uint32_t fake_io_surface_id = 7;
layer->SetIOSurfaceProperties(fake_io_surface_id, layer->bounds());
@@ -3849,17 +3837,17 @@ SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostTestIOSurfaceLayerInvalidate);
class LayerTreeHostTestPushHiddenLayer : public LayerTreeHostTest {
protected:
void SetupTree() override {
- root_layer_ = Layer::Create(layer_settings());
+ root_layer_ = Layer::Create();
root_layer_->SetPosition(gfx::PointF());
root_layer_->SetBounds(gfx::Size(10, 10));
- parent_layer_ = SolidColorLayer::Create(layer_settings());
+ parent_layer_ = SolidColorLayer::Create();
parent_layer_->SetPosition(gfx::PointF());
parent_layer_->SetBounds(gfx::Size(10, 10));
parent_layer_->SetIsDrawable(true);
root_layer_->AddChild(parent_layer_);
- child_layer_ = SolidColorLayer::Create(layer_settings());
+ child_layer_ = SolidColorLayer::Create();
child_layer_->SetPosition(gfx::PointF());
child_layer_->SetBounds(gfx::Size(10, 10));
child_layer_->SetIsDrawable(true);
@@ -3915,7 +3903,7 @@ SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostTestPushHiddenLayer);
class LayerTreeHostTestUpdateLayerInEmptyViewport : public LayerTreeHostTest {
protected:
void SetupTree() override {
- root_layer_ = FakePictureLayer::Create(layer_settings(), &client_);
+ root_layer_ = FakePictureLayer::Create(&client_);
root_layer_->SetBounds(gfx::Size(10, 10));
layer_tree_host()->SetRootLayer(root_layer_);
@@ -3955,17 +3943,14 @@ class LayerTreeHostTestElasticOverscroll : public LayerTreeHostTest {
}
void SetupTree() override {
- root_layer_ = Layer::Create(layer_settings());
+ root_layer_ = Layer::Create();
root_layer_->SetBounds(gfx::Size(10, 10));
- scoped_refptr<Layer> inner_viewport_container_layer =
- Layer::Create(layer_settings());
+ scoped_refptr<Layer> inner_viewport_container_layer = Layer::Create();
inner_viewport_container_layer->SetBounds(gfx::Size(10, 10));
- scoped_refptr<Layer> overscroll_elasticity_layer =
- Layer::Create(layer_settings());
- scoped_refptr<Layer> page_scale_layer = Layer::Create(layer_settings());
- scoped_refptr<Layer> inner_viewport_scroll_layer =
- Layer::Create(layer_settings());
+ scoped_refptr<Layer> overscroll_elasticity_layer = Layer::Create();
+ scoped_refptr<Layer> page_scale_layer = Layer::Create();
+ scoped_refptr<Layer> inner_viewport_scroll_layer = Layer::Create();
inner_viewport_scroll_layer->SetScrollClipLayerId(
inner_viewport_container_layer->id());
inner_viewport_scroll_layer->SetIsContainerForFixedPositionLayers(true);
@@ -3975,8 +3960,7 @@ class LayerTreeHostTestElasticOverscroll : public LayerTreeHostTest {
overscroll_elasticity_layer->AddChild(page_scale_layer);
page_scale_layer->AddChild(inner_viewport_scroll_layer);
- scoped_refptr<Layer> content_layer =
- FakePictureLayer::Create(layer_settings(), &client_);
+ scoped_refptr<Layer> content_layer = FakePictureLayer::Create(&client_);
content_layer->SetBounds(gfx::Size(10, 10));
inner_viewport_scroll_layer->AddChild(content_layer);
@@ -4077,7 +4061,7 @@ class LayerTreeHostTestSetMemoryPolicyOnLostOutputSurface
}
void SetupTree() override {
- root_ = FakePictureLayer::Create(layer_settings(), &client_);
+ root_ = FakePictureLayer::Create(&client_);
root_->SetBounds(gfx::Size(20, 20));
layer_tree_host()->SetRootLayer(root_);
LayerTreeHostTest::SetupTree();
@@ -4331,7 +4315,7 @@ class LayerTreeHostTestKeepSwapPromise : public LayerTreeTest {
LayerTreeHostTestKeepSwapPromise() {}
void BeginTest() override {
- layer_ = SolidColorLayer::Create(layer_settings());
+ layer_ = SolidColorLayer::Create();
layer_->SetIsDrawable(true);
layer_->SetBounds(gfx::Size(10, 10));
layer_tree_host()->SetRootLayer(layer_);
@@ -4651,7 +4635,7 @@ class LayerTreeHostTestGpuRasterizationDefault : public LayerTreeHostTest {
scoped_refptr<FakePictureLayer> layer =
FakePictureLayer::CreateWithRecordingSource(
- layer_settings(), &layer_client_, std::move(recording_source));
+ &layer_client_, std::move(recording_source));
layer_ = layer.get();
layer->SetBounds(gfx::Size(10, 10));
layer->SetIsDrawable(true);
@@ -4707,7 +4691,7 @@ class LayerTreeHostTestEmptyLayerGpuRasterization : public LayerTreeHostTest {
scoped_refptr<FakePictureLayer> layer =
FakePictureLayer::CreateWithRecordingSource(
- layer_settings(), &layer_client_, std::move(recording_source));
+ &layer_client_, std::move(recording_source));
layer_ = layer.get();
layer->SetBounds(gfx::Size());
layer->SetIsDrawable(true);
@@ -4765,7 +4749,7 @@ class LayerTreeHostTestGpuRasterizationEnabled : public LayerTreeHostTest {
scoped_refptr<FakePictureLayer> layer =
FakePictureLayer::CreateWithRecordingSource(
- layer_settings(), &layer_client_, std::move(recording_source));
+ &layer_client_, std::move(recording_source));
layer_ = layer.get();
layer->SetBounds(gfx::Size(10, 10));
layer->SetIsDrawable(true);
@@ -4835,7 +4819,7 @@ class LayerTreeHostTestGpuRasterizationForced : public LayerTreeHostTest {
scoped_refptr<FakePictureLayer> layer =
FakePictureLayer::CreateWithRecordingSource(
- layer_settings(), &layer_client_, std::move(recording_source));
+ &layer_client_, std::move(recording_source));
layer_ = layer.get();
layer->SetBounds(gfx::Size(10, 10));
@@ -5264,12 +5248,12 @@ class LayerTreeHostTestCrispUpAfterPinchEnds : public LayerTreeHostTest {
posted_ = false;
client_.set_fill_with_nonsolid_color(true);
- scoped_refptr<Layer> root_clip = Layer::Create(layer_settings());
+ scoped_refptr<Layer> root_clip = Layer::Create();
root_clip->SetBounds(gfx::Size(500, 500));
- scoped_refptr<Layer> page_scale_layer = Layer::Create(layer_settings());
+ scoped_refptr<Layer> page_scale_layer = Layer::Create();
page_scale_layer->SetBounds(gfx::Size(500, 500));
- scoped_refptr<Layer> pinch = Layer::Create(layer_settings());
+ scoped_refptr<Layer> pinch = Layer::Create();
pinch->SetBounds(gfx::Size(500, 500));
pinch->SetScrollClipLayerId(root_clip->id());
pinch->SetIsContainerForFixedPositionLayers(true);
@@ -5280,7 +5264,7 @@ class LayerTreeHostTestCrispUpAfterPinchEnds : public LayerTreeHostTest {
new FakeDisplayListRecordingSource);
recording->SetPlaybackAllowedEvent(&playback_allowed_event_);
scoped_refptr<FakePictureLayer> layer =
- FakePictureLayer::CreateWithRecordingSource(layer_settings(), &client_,
+ FakePictureLayer::CreateWithRecordingSource(&client_,
std::move(recording));
layer->SetBounds(gfx::Size(500, 500));
layer->SetContentsOpaque(true);
@@ -5478,14 +5462,14 @@ class RasterizeWithGpuRasterizationCreatesResources : public LayerTreeHostTest {
void SetupTree() override {
client_.set_fill_with_nonsolid_color(true);
- scoped_refptr<Layer> root = Layer::Create(layer_settings());
+ scoped_refptr<Layer> root = Layer::Create();
root->SetBounds(gfx::Size(500, 500));
client_.set_bounds(root->bounds());
scoped_ptr<FakeDisplayListRecordingSource> recording(
new FakeDisplayListRecordingSource);
scoped_refptr<FakePictureLayer> layer =
- FakePictureLayer::CreateWithRecordingSource(layer_settings(), &client_,
+ FakePictureLayer::CreateWithRecordingSource(&client_,
std::move(recording));
layer->SetBounds(gfx::Size(500, 500));
layer->SetContentsOpaque(true);
@@ -5527,7 +5511,7 @@ class GpuRasterizationRasterizesBorderTiles : public LayerTreeHostTest {
scoped_ptr<FakeDisplayListRecordingSource> recording(
new FakeDisplayListRecordingSource);
scoped_refptr<FakePictureLayer> root =
- FakePictureLayer::CreateWithRecordingSource(layer_settings(), &client_,
+ FakePictureLayer::CreateWithRecordingSource(&client_,
std::move(recording));
root->SetBounds(gfx::Size(10000, 10000));
client_.set_bounds(root->bounds());
@@ -5569,12 +5553,12 @@ class LayerTreeHostTestContinuousDrawWhenCreatingVisibleTiles
continuous_draws_ = 0;
client_.set_fill_with_nonsolid_color(true);
- scoped_refptr<Layer> root_clip = Layer::Create(layer_settings());
+ scoped_refptr<Layer> root_clip = Layer::Create();
root_clip->SetBounds(gfx::Size(500, 500));
- scoped_refptr<Layer> page_scale_layer = Layer::Create(layer_settings());
+ scoped_refptr<Layer> page_scale_layer = Layer::Create();
page_scale_layer->SetBounds(gfx::Size(500, 500));
- scoped_refptr<Layer> pinch = Layer::Create(layer_settings());
+ scoped_refptr<Layer> pinch = Layer::Create();
pinch->SetBounds(gfx::Size(500, 500));
pinch->SetScrollClipLayerId(root_clip->id());
pinch->SetIsContainerForFixedPositionLayers(true);
@@ -5585,7 +5569,7 @@ class LayerTreeHostTestContinuousDrawWhenCreatingVisibleTiles
new FakeDisplayListRecordingSource);
recording->SetPlaybackAllowedEvent(&playback_allowed_event_);
scoped_refptr<FakePictureLayer> layer =
- FakePictureLayer::CreateWithRecordingSource(layer_settings(), &client_,
+ FakePictureLayer::CreateWithRecordingSource(&client_,
std::move(recording));
layer->SetBounds(gfx::Size(500, 500));
layer->SetContentsOpaque(true);
@@ -5746,7 +5730,7 @@ class LayerTreeHostTestOneActivatePerPrepareTiles : public LayerTreeHostTest {
void SetupTree() override {
client_.set_fill_with_nonsolid_color(true);
scoped_refptr<FakePictureLayer> root_layer =
- FakePictureLayer::Create(layer_settings(), &client_);
+ FakePictureLayer::Create(&client_);
root_layer->SetBounds(gfx::Size(1500, 1500));
root_layer->SetIsDrawable(true);
@@ -5802,12 +5786,12 @@ class LayerTreeHostTestFrameTimingRequestsSaveTimestamps
void SetupTree() override {
scoped_refptr<FakePictureLayer> root_layer =
- FakePictureLayer::Create(layer_settings(), &client_);
+ FakePictureLayer::Create(&client_);
root_layer->SetBounds(gfx::Size(200, 200));
root_layer->SetIsDrawable(true);
scoped_refptr<FakePictureLayer> child_layer =
- FakePictureLayer::Create(layer_settings(), &client_);
+ FakePictureLayer::Create(&client_);
child_layer->SetBounds(gfx::Size(1500, 1500));
child_layer->SetIsDrawable(true);
@@ -5890,7 +5874,7 @@ class LayerTreeHostTestActivationCausesPrepareTiles : public LayerTreeHostTest {
void SetupTree() override {
client_.set_fill_with_nonsolid_color(true);
scoped_refptr<FakePictureLayer> root_layer =
- FakePictureLayer::Create(layer_settings(), &client_);
+ FakePictureLayer::Create(&client_);
root_layer->SetBounds(gfx::Size(150, 150));
root_layer->SetIsDrawable(true);
@@ -5969,8 +5953,8 @@ SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostTestNoTasksBetweenWillAndDidCommit);
class LayerTreeHostTestUpdateCopyRequests : public LayerTreeHostTest {
protected:
void SetupTree() override {
- root = Layer::Create(layer_settings());
- child = Layer::Create(layer_settings());
+ root = Layer::Create();
+ child = Layer::Create();
root->AddChild(child);
layer_tree_host()->SetRootLayer(root);
LayerTreeHostTest::SetupTree();
@@ -6028,21 +6012,21 @@ class LayerTreeTestMaskLayerForSurfaceWithClippedLayer : public LayerTreeTest {
// the surface bounds to be larger. It also has a parent that clips the
// masked layer and its surface.
- scoped_refptr<Layer> root = Layer::Create(layer_settings());
+ scoped_refptr<Layer> root = Layer::Create();
- scoped_refptr<Layer> clipping_layer = Layer::Create(layer_settings());
+ scoped_refptr<Layer> clipping_layer = Layer::Create();
root->AddChild(clipping_layer);
scoped_refptr<FakePictureLayer> content_layer =
- FakePictureLayer::Create(layer_settings(), &client_);
+ FakePictureLayer::Create(&client_);
clipping_layer->AddChild(content_layer);
scoped_refptr<FakePictureLayer> content_child_layer =
- FakePictureLayer::Create(layer_settings(), &client_);
+ FakePictureLayer::Create(&client_);
content_layer->AddChild(content_child_layer);
scoped_refptr<FakePictureLayer> mask_layer =
- FakePictureLayer::Create(layer_settings(), &client_);
+ FakePictureLayer::Create(&client_);
content_layer->SetMaskLayer(mask_layer.get());
gfx::Size root_size(100, 100);
@@ -6125,17 +6109,17 @@ class LayerTreeTestMaskLayerWithScaling : public LayerTreeTest {
// +-- Content Layer
// +--Mask
- scoped_refptr<Layer> root = Layer::Create(layer_settings());
+ scoped_refptr<Layer> root = Layer::Create();
- scoped_refptr<Layer> scaling_layer = Layer::Create(layer_settings());
+ scoped_refptr<Layer> scaling_layer = Layer::Create();
root->AddChild(scaling_layer);
scoped_refptr<FakePictureLayer> content_layer =
- FakePictureLayer::Create(layer_settings(), &client_);
+ FakePictureLayer::Create(&client_);
scaling_layer->AddChild(content_layer);
scoped_refptr<FakePictureLayer> mask_layer =
- FakePictureLayer::Create(layer_settings(), &client_);
+ FakePictureLayer::Create(&client_);
content_layer->SetMaskLayer(mask_layer.get());
gfx::Size root_size(100, 100);
@@ -6221,14 +6205,14 @@ class LayerTreeTestMaskLayerWithDifferentBounds : public LayerTreeTest {
// The mask layer has bounds 100x100 but is attached to a layer with bounds
// 50x50.
- scoped_refptr<Layer> root = Layer::Create(layer_settings());
+ scoped_refptr<Layer> root = Layer::Create();
scoped_refptr<FakePictureLayer> content_layer =
- FakePictureLayer::Create(layer_settings(), &client_);
+ FakePictureLayer::Create(&client_);
root->AddChild(content_layer);
scoped_refptr<FakePictureLayer> mask_layer =
- FakePictureLayer::Create(layer_settings(), &client_);
+ FakePictureLayer::Create(&client_);
content_layer->SetMaskLayer(mask_layer.get());
gfx::Size root_size(100, 100);
@@ -6310,17 +6294,17 @@ class LayerTreeTestReflectionMaskLayerWithDifferentBounds
// The replica's mask layer has bounds 100x100 but the replica is of a
// layer with bounds 50x50.
- scoped_refptr<Layer> root = Layer::Create(layer_settings());
+ scoped_refptr<Layer> root = Layer::Create();
scoped_refptr<FakePictureLayer> content_layer =
- FakePictureLayer::Create(layer_settings(), &client_);
+ FakePictureLayer::Create(&client_);
root->AddChild(content_layer);
- scoped_refptr<Layer> replica_layer = Layer::Create(layer_settings());
+ scoped_refptr<Layer> replica_layer = Layer::Create();
content_layer->SetReplicaLayer(replica_layer.get());
scoped_refptr<FakePictureLayer> mask_layer =
- FakePictureLayer::Create(layer_settings(), &client_);
+ FakePictureLayer::Create(&client_);
replica_layer->SetMaskLayer(mask_layer.get());
gfx::Size root_size(100, 100);
@@ -6404,20 +6388,20 @@ class LayerTreeTestReflectionMaskLayerForSurfaceWithUnclippedChild
// The replica is of a layer with bounds 50x50, but it has a child that
// causes the surface bounds to be larger.
- scoped_refptr<Layer> root = Layer::Create(layer_settings());
+ scoped_refptr<Layer> root = Layer::Create();
scoped_refptr<FakePictureLayer> content_layer =
- FakePictureLayer::Create(layer_settings(), &client_);
+ FakePictureLayer::Create(&client_);
root->AddChild(content_layer);
- content_child_layer_ = FakePictureLayer::Create(layer_settings(), &client_);
+ content_child_layer_ = FakePictureLayer::Create(&client_);
content_layer->AddChild(content_child_layer_);
- scoped_refptr<Layer> replica_layer = Layer::Create(layer_settings());
+ scoped_refptr<Layer> replica_layer = Layer::Create();
content_layer->SetReplicaLayer(replica_layer.get());
scoped_refptr<FakePictureLayer> mask_layer =
- FakePictureLayer::Create(layer_settings(), &client_);
+ FakePictureLayer::Create(&client_);
replica_layer->SetMaskLayer(mask_layer.get());
gfx::Size root_size(100, 100);
@@ -6509,14 +6493,13 @@ class LayerTreeTestPageScaleFlags : public LayerTreeTest {
// -page scale child2
// -post page scale
- scoped_refptr<Layer> root = Layer::Create(layer_settings());
- scoped_refptr<Layer> pre_page_scale = Layer::Create(layer_settings());
- scoped_refptr<Layer> page_scale = Layer::Create(layer_settings());
- scoped_refptr<Layer> page_scale_child1 = Layer::Create(layer_settings());
- scoped_refptr<Layer> page_scale_grandchild =
- Layer::Create(layer_settings());
- scoped_refptr<Layer> page_scale_child2 = Layer::Create(layer_settings());
- scoped_refptr<Layer> post_page_scale = Layer::Create(layer_settings());
+ scoped_refptr<Layer> root = Layer::Create();
+ scoped_refptr<Layer> pre_page_scale = Layer::Create();
+ scoped_refptr<Layer> page_scale = Layer::Create();
+ scoped_refptr<Layer> page_scale_child1 = Layer::Create();
+ scoped_refptr<Layer> page_scale_grandchild = Layer::Create();
+ scoped_refptr<Layer> page_scale_child2 = Layer::Create();
+ scoped_refptr<Layer> post_page_scale = Layer::Create();
root->AddChild(pre_page_scale);
root->AddChild(page_scale);
@@ -6578,10 +6561,9 @@ class LayerTreeHostScrollingAndScalingUpdatesLayers : public LayerTreeHostTest {
void SetupTree() override {
LayerTreeHostTest::SetupTree();
Layer* root_layer = layer_tree_host()->root_layer();
- scoped_refptr<Layer> scroll_layer = Layer::Create(layer_settings());
+ scoped_refptr<Layer> scroll_layer = Layer::Create();
CreateVirtualViewportLayers(root_layer, scroll_layer, root_layer->bounds(),
- root_layer->bounds(), layer_tree_host(),
- layer_settings());
+ root_layer->bounds(), layer_tree_host());
}
void BeginTest() override {

Powered by Google App Engine
This is Rietveld 408576698