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

Unified Diff: cc/trees/layer_tree_host_unittest_context.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
« no previous file with comments | « cc/trees/layer_tree_host_unittest_animation.cc ('k') | cc/trees/layer_tree_host_unittest_copyrequest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_unittest_context.cc
diff --git a/cc/trees/layer_tree_host_unittest_context.cc b/cc/trees/layer_tree_host_unittest_context.cc
index 3e8cdeffb61de9f35413e25d6dacfc9e080d483c..34fc31396444927d1e6b840a05ebc541f2cf5707 100644
--- a/cc/trees/layer_tree_host_unittest_context.cc
+++ b/cc/trees/layer_tree_host_unittest_context.cc
@@ -617,7 +617,7 @@ class LayerTreeHostContextTestLostContextSucceedsWithContent
: public LayerTreeHostContextTestLostContextSucceeds {
public:
void SetupTree() override {
- root_ = Layer::Create(layer_settings());
+ root_ = Layer::Create();
root_->SetBounds(gfx::Size(10, 10));
root_->SetIsDrawable(true);
@@ -626,7 +626,7 @@ class LayerTreeHostContextTestLostContextSucceedsWithContent
paint.setColor(SkColorSetARGB(100, 80, 200, 200));
client_.add_draw_rect(gfx::Rect(5, 5), paint);
- layer_ = FakePictureLayer::Create(layer_settings(), &client_);
+ layer_ = FakePictureLayer::Create(&client_);
layer_->SetBounds(gfx::Size(10, 10));
layer_->SetIsDrawable(true);
@@ -706,7 +706,7 @@ class LayerTreeHostContextTestLostContextAndEvictTextures
client_.add_draw_rect(gfx::Rect(5, 5), paint);
scoped_refptr<FakePictureLayer> picture_layer =
- FakePictureLayer::Create(layer_settings(), &client_);
+ FakePictureLayer::Create(&client_);
picture_layer->SetBounds(gfx::Size(10, 20));
client_.set_bounds(picture_layer->bounds());
layer_tree_host()->SetRootLayer(picture_layer);
@@ -834,9 +834,9 @@ class LayerTreeHostContextTestLayersNotified : public LayerTreeHostContextTest {
: LayerTreeHostContextTest(), num_commits_(0) {}
void SetupTree() override {
- root_ = FakePictureLayer::Create(layer_settings(), &client_);
- child_ = FakePictureLayer::Create(layer_settings(), &client_);
- grandchild_ = FakePictureLayer::Create(layer_settings(), &client_);
+ root_ = FakePictureLayer::Create(&client_);
+ child_ = FakePictureLayer::Create(&client_);
+ grandchild_ = FakePictureLayer::Create(&client_);
root_->AddChild(child_);
child_->AddChild(grandchild_);
@@ -954,18 +954,16 @@ class LayerTreeHostContextTestDontUseLostResources
gpu::SyncToken sync_token;
gl->GenSyncTokenCHROMIUM(fence_sync, sync_token.GetData());
- scoped_refptr<Layer> root = Layer::Create(layer_settings());
+ scoped_refptr<Layer> root = Layer::Create();
root->SetBounds(gfx::Size(10, 10));
root->SetIsDrawable(true);
- scoped_refptr<PictureLayer> layer =
- PictureLayer::Create(layer_settings(), &client_);
+ scoped_refptr<PictureLayer> layer = PictureLayer::Create(&client_);
layer->SetBounds(gfx::Size(10, 10));
layer->SetIsDrawable(true);
root->AddChild(layer);
- scoped_refptr<TextureLayer> texture =
- TextureLayer::CreateForMailbox(layer_settings_, NULL);
+ scoped_refptr<TextureLayer> texture = TextureLayer::CreateForMailbox(NULL);
texture->SetBounds(gfx::Size(10, 10));
texture->SetIsDrawable(true);
texture->SetTextureMailbox(
@@ -975,32 +973,31 @@ class LayerTreeHostContextTestDontUseLostResources
EmptyReleaseCallback)));
root->AddChild(texture);
- scoped_refptr<PictureLayer> mask =
- PictureLayer::Create(layer_settings_, &client_);
+ scoped_refptr<PictureLayer> mask = PictureLayer::Create(&client_);
mask->SetBounds(gfx::Size(10, 10));
client_.set_bounds(mask->bounds());
scoped_refptr<PictureLayer> layer_with_mask =
- PictureLayer::Create(layer_settings_, &client_);
+ PictureLayer::Create(&client_);
layer_with_mask->SetBounds(gfx::Size(10, 10));
layer_with_mask->SetIsDrawable(true);
layer_with_mask->SetMaskLayer(mask.get());
root->AddChild(layer_with_mask);
- scoped_refptr<VideoLayer> video_color = VideoLayer::Create(
- layer_settings_, &color_frame_provider_, media::VIDEO_ROTATION_0);
+ scoped_refptr<VideoLayer> video_color =
+ VideoLayer::Create(&color_frame_provider_, media::VIDEO_ROTATION_0);
video_color->SetBounds(gfx::Size(10, 10));
video_color->SetIsDrawable(true);
root->AddChild(video_color);
- scoped_refptr<VideoLayer> video_hw = VideoLayer::Create(
- layer_settings_, &hw_frame_provider_, media::VIDEO_ROTATION_0);
+ scoped_refptr<VideoLayer> video_hw =
+ VideoLayer::Create(&hw_frame_provider_, media::VIDEO_ROTATION_0);
video_hw->SetBounds(gfx::Size(10, 10));
video_hw->SetIsDrawable(true);
root->AddChild(video_hw);
- scoped_refptr<VideoLayer> video_scaled_hw = VideoLayer::Create(
- layer_settings_, &scaled_hw_frame_provider_, media::VIDEO_ROTATION_0);
+ scoped_refptr<VideoLayer> video_scaled_hw =
+ VideoLayer::Create(&scaled_hw_frame_provider_, media::VIDEO_ROTATION_0);
video_scaled_hw->SetBounds(gfx::Size(10, 10));
video_scaled_hw->SetIsDrawable(true);
root->AddChild(video_scaled_hw);
@@ -1025,8 +1022,7 @@ class LayerTreeHostContextTestDontUseLostResources
hw_frame_provider_.set_frame(hw_video_frame_);
scaled_hw_frame_provider_.set_frame(scaled_hw_video_frame_);
- scoped_refptr<IOSurfaceLayer> io_surface =
- IOSurfaceLayer::Create(layer_settings_);
+ scoped_refptr<IOSurfaceLayer> io_surface = IOSurfaceLayer::Create();
io_surface->SetBounds(gfx::Size(10, 10));
io_surface->SetIsDrawable(true);
io_surface->SetIOSurfaceProperties(1, gfx::Size(10, 10));
@@ -1038,8 +1034,7 @@ class LayerTreeHostContextTestDontUseLostResources
layer_tree_host()->SetDebugState(debug_state);
scoped_refptr<PaintedScrollbarLayer> scrollbar =
- PaintedScrollbarLayer::Create(layer_settings_,
- scoped_ptr<Scrollbar>(new FakeScrollbar),
+ PaintedScrollbarLayer::Create(scoped_ptr<Scrollbar>(new FakeScrollbar),
layer->id());
scrollbar->SetBounds(gfx::Size(10, 10));
scrollbar->SetIsDrawable(true);
@@ -1113,8 +1108,6 @@ class LayerTreeHostContextTestDontUseLostResources
FakeVideoFrameProvider color_frame_provider_;
FakeVideoFrameProvider hw_frame_provider_;
FakeVideoFrameProvider scaled_hw_frame_provider_;
-
- LayerSettings layer_settings_;
};
SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostContextTestDontUseLostResources);
@@ -1123,12 +1116,11 @@ class LayerTreeHostContextTestImplSidePainting
: public LayerTreeHostContextTest {
public:
void SetupTree() override {
- scoped_refptr<Layer> root = Layer::Create(layer_settings());
+ scoped_refptr<Layer> root = Layer::Create();
root->SetBounds(gfx::Size(10, 10));
root->SetIsDrawable(true);
- scoped_refptr<PictureLayer> picture =
- PictureLayer::Create(layer_settings(), &client_);
+ scoped_refptr<PictureLayer> picture = PictureLayer::Create(&client_);
picture->SetBounds(gfx::Size(10, 10));
client_.set_bounds(picture->bounds());
picture->SetIsDrawable(true);
@@ -1158,9 +1150,9 @@ class ScrollbarLayerLostContext : public LayerTreeHostContextTest {
ScrollbarLayerLostContext() : commits_(0) {}
void BeginTest() override {
- scoped_refptr<Layer> scroll_layer = Layer::Create(layer_settings());
- scrollbar_layer_ = FakePaintedScrollbarLayer::Create(
- layer_settings(), false, true, scroll_layer->id());
+ scoped_refptr<Layer> scroll_layer = Layer::Create();
+ scrollbar_layer_ =
+ FakePaintedScrollbarLayer::Create(false, true, scroll_layer->id());
scrollbar_layer_->SetBounds(gfx::Size(10, 100));
layer_tree_host()->root_layer()->AddChild(scrollbar_layer_);
layer_tree_host()->root_layer()->AddChild(scroll_layer);
« no previous file with comments | « cc/trees/layer_tree_host_unittest_animation.cc ('k') | cc/trees/layer_tree_host_unittest_copyrequest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698