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

Unified Diff: cc/trees/layer_tree_host_pixeltest_masks.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/trees/layer_tree_host_pixeltest_blending.cc ('k') | cc/trees/layer_tree_host_pixeltest_readback.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_pixeltest_masks.cc
diff --git a/cc/trees/layer_tree_host_pixeltest_masks.cc b/cc/trees/layer_tree_host_pixeltest_masks.cc
index 0cb6aeaa84646b804a2a4de3966fb6d012fcdb2e..086f3ea7b433249de9a8a9939138ccea650f2773 100644
--- a/cc/trees/layer_tree_host_pixeltest_masks.cc
+++ b/cc/trees/layer_tree_host_pixeltest_masks.cc
@@ -67,7 +67,8 @@ TEST_P(LayerTreeHostMasksPixelTest, MaskOfLayer) {
gfx::Size mask_bounds(50, 50);
MaskContentLayerClient client(mask_bounds);
- scoped_refptr<PictureLayer> mask = PictureLayer::Create(&client);
+ scoped_refptr<PictureLayer> mask =
+ PictureLayer::Create(layer_settings(), &client);
mask->SetBounds(mask_bounds);
mask->SetIsDrawable(true);
mask->SetIsMask(true);
@@ -83,7 +84,8 @@ TEST_P(LayerTreeHostMasksPixelTest, ImageMaskOfLayer) {
gfx::Size mask_bounds(50, 50);
- scoped_refptr<PictureImageLayer> mask = PictureImageLayer::Create();
+ scoped_refptr<PictureImageLayer> mask =
+ PictureImageLayer::Create(layer_settings());
mask->SetIsDrawable(true);
mask->SetIsMask(true);
mask->SetBounds(mask_bounds);
@@ -111,7 +113,7 @@ TEST_P(LayerTreeHostMasksPixelTest, MaskOfClippedLayer) {
gfx::Rect(100, 100), SK_ColorWHITE);
// Clip to the top half of the green layer.
- scoped_refptr<Layer> clip = Layer::Create();
+ scoped_refptr<Layer> clip = Layer::Create(layer_settings());
clip->SetPosition(gfx::Point(0, 0));
clip->SetBounds(gfx::Size(100, 50));
clip->SetMasksToBounds(true);
@@ -123,7 +125,8 @@ TEST_P(LayerTreeHostMasksPixelTest, MaskOfClippedLayer) {
gfx::Size mask_bounds(50, 50);
MaskContentLayerClient client(mask_bounds);
- scoped_refptr<PictureLayer> mask = PictureLayer::Create(&client);
+ scoped_refptr<PictureLayer> mask =
+ PictureLayer::Create(layer_settings(), &client);
mask->SetBounds(mask_bounds);
mask->SetIsDrawable(true);
mask->SetIsMask(true);
@@ -140,7 +143,8 @@ TEST_P(LayerTreeHostMasksPixelTest, MaskWithReplica) {
gfx::Size mask_bounds(50, 50);
MaskContentLayerClient client(mask_bounds);
- scoped_refptr<PictureLayer> mask = PictureLayer::Create(&client);
+ scoped_refptr<PictureLayer> mask =
+ PictureLayer::Create(layer_settings(), &client);
mask->SetBounds(mask_bounds);
mask->SetIsDrawable(true);
mask->SetIsMask(true);
@@ -153,7 +157,7 @@ TEST_P(LayerTreeHostMasksPixelTest, MaskWithReplica) {
gfx::Transform replica_transform;
replica_transform.Rotate(-90.0);
- scoped_refptr<Layer> replica = Layer::Create();
+ scoped_refptr<Layer> replica = Layer::Create(layer_settings());
replica->SetTransformOrigin(gfx::Point3F(25.f, 25.f, 0.f));
replica->SetPosition(gfx::Point(50, 50));
replica->SetTransform(replica_transform);
@@ -169,14 +173,15 @@ TEST_P(LayerTreeHostMasksPixelTest, MaskWithReplicaOfClippedLayer) {
gfx::Size mask_bounds(50, 50);
MaskContentLayerClient client(mask_bounds);
- scoped_refptr<PictureLayer> mask = PictureLayer::Create(&client);
+ scoped_refptr<PictureLayer> mask =
+ PictureLayer::Create(layer_settings(), &client);
mask->SetBounds(mask_bounds);
mask->SetIsDrawable(true);
mask->SetIsMask(true);
// Clip to the bottom half of the green layer, and the left half of the
// replica.
- scoped_refptr<Layer> clip = Layer::Create();
+ scoped_refptr<Layer> clip = Layer::Create(layer_settings());
clip->SetPosition(gfx::Point(0, 25));
clip->SetBounds(gfx::Size(75, 75));
clip->SetMasksToBounds(true);
@@ -190,7 +195,7 @@ TEST_P(LayerTreeHostMasksPixelTest, MaskWithReplicaOfClippedLayer) {
gfx::Transform replica_transform;
replica_transform.Rotate(-90.0);
- scoped_refptr<Layer> replica = Layer::Create();
+ scoped_refptr<Layer> replica = Layer::Create(layer_settings());
replica->SetTransformOrigin(gfx::Point3F(25.f, 25.f, 0.f));
replica->SetPosition(gfx::Point(50, 50));
replica->SetTransform(replica_transform);
@@ -207,7 +212,8 @@ TEST_P(LayerTreeHostMasksPixelTest, MaskOfReplica) {
gfx::Size mask_bounds(50, 50);
MaskContentLayerClient client(mask_bounds);
- scoped_refptr<PictureLayer> mask = PictureLayer::Create(&client);
+ scoped_refptr<PictureLayer> mask =
+ PictureLayer::Create(layer_settings(), &client);
mask->SetBounds(mask_bounds);
mask->SetIsDrawable(true);
mask->SetIsMask(true);
@@ -224,7 +230,7 @@ TEST_P(LayerTreeHostMasksPixelTest, MaskOfReplica) {
replica_transform.Rotate(180.0);
replica_transform.Translate(50.0, 0.0);
- scoped_refptr<Layer> replica = Layer::Create();
+ scoped_refptr<Layer> replica = Layer::Create(layer_settings());
replica->SetTransformOrigin(gfx::Point3F(50.f, 50.f, 0.f));
replica->SetPosition(gfx::Point());
replica->SetTransform(replica_transform);
@@ -241,13 +247,14 @@ TEST_P(LayerTreeHostMasksPixelTest, MaskOfReplicaOfClippedLayer) {
gfx::Size mask_bounds(50, 50);
MaskContentLayerClient client(mask_bounds);
- scoped_refptr<PictureLayer> mask = PictureLayer::Create(&client);
+ scoped_refptr<PictureLayer> mask =
+ PictureLayer::Create(layer_settings(), &client);
mask->SetBounds(mask_bounds);
mask->SetIsDrawable(true);
mask->SetIsMask(true);
// Clip to the bottom 3/4 of the green layer, and the top 3/4 of the replica.
- scoped_refptr<Layer> clip = Layer::Create();
+ scoped_refptr<Layer> clip = Layer::Create(layer_settings());
clip->SetPosition(gfx::Point(0, 12));
clip->SetBounds(gfx::Size(100, 75));
clip->SetMasksToBounds(true);
@@ -265,7 +272,7 @@ TEST_P(LayerTreeHostMasksPixelTest, MaskOfReplicaOfClippedLayer) {
replica_transform.Rotate(180.0);
replica_transform.Translate(50.0, 0.0);
- scoped_refptr<Layer> replica = Layer::Create();
+ scoped_refptr<Layer> replica = Layer::Create(layer_settings());
replica->SetTransformOrigin(gfx::Point3F(50.f, 50.f, 0.f));
replica->SetPosition(gfx::Point());
replica->SetTransform(replica_transform);
@@ -369,7 +376,8 @@ TEST_P(LayerTreeHostMasksForBackgroundFiltersPixelTest,
gfx::Size picture_bounds(100, 100);
CheckerContentLayerClient picture_client(picture_bounds, SK_ColorGREEN, true);
- scoped_refptr<PictureLayer> picture = PictureLayer::Create(&picture_client);
+ scoped_refptr<PictureLayer> picture =
+ PictureLayer::Create(layer_settings(), &picture_client);
picture->SetBounds(picture_bounds);
picture->SetIsDrawable(true);
@@ -384,7 +392,8 @@ TEST_P(LayerTreeHostMasksForBackgroundFiltersPixelTest,
gfx::Size mask_bounds(100, 100);
CircleContentLayerClient mask_client(mask_bounds);
- scoped_refptr<PictureLayer> mask = PictureLayer::Create(&mask_client);
+ scoped_refptr<PictureLayer> mask =
+ PictureLayer::Create(layer_settings(), &mask_client);
mask->SetBounds(mask_bounds);
mask->SetIsDrawable(true);
mask->SetIsMask(true);
@@ -417,14 +426,14 @@ TEST_P(LayerTreeHostMasksForBackgroundFiltersPixelTest,
CheckerContentLayerClient picture_client_vertical(
picture_bounds, SK_ColorGREEN, true);
scoped_refptr<PictureLayer> picture_vertical =
- PictureLayer::Create(&picture_client_vertical);
+ PictureLayer::Create(layer_settings(), &picture_client_vertical);
picture_vertical->SetBounds(picture_bounds);
picture_vertical->SetIsDrawable(true);
CheckerContentLayerClient picture_client_horizontal(
picture_bounds, SK_ColorMAGENTA, false);
scoped_refptr<PictureLayer> picture_horizontal =
- PictureLayer::Create(&picture_client_horizontal);
+ PictureLayer::Create(layer_settings(), &picture_client_horizontal);
picture_horizontal->SetBounds(picture_bounds);
picture_horizontal->SetIsDrawable(true);
picture_horizontal->SetContentsOpaque(false);
@@ -435,7 +444,8 @@ TEST_P(LayerTreeHostMasksForBackgroundFiltersPixelTest,
gfx::Size mask_bounds(128, 128);
CircleContentLayerClient mask_client(mask_bounds);
- scoped_refptr<PictureLayer> mask = PictureLayer::Create(&mask_client);
+ scoped_refptr<PictureLayer> mask =
+ PictureLayer::Create(layer_settings(), &mask_client);
mask->SetBounds(mask_bounds);
mask->SetIsDrawable(true);
mask->SetIsMask(true);
« no previous file with comments | « cc/trees/layer_tree_host_pixeltest_blending.cc ('k') | cc/trees/layer_tree_host_pixeltest_readback.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698