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

Unified Diff: cc/trees/layer_tree_host_pixeltest_masks.cc

Issue 2828353003: Determine mask UVs based on texture size (Closed)
Patch Set: Add tolerance to filter_effects.html Created 3 years, 8 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/effect_node.cc ('k') | cc/trees/layer_tree_host_unittest.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 eed99f6a625e026151c71b62a9767b34c683bc5e..c1dac76dedad4ea177b6fb5dccd23ae3c0c77eb6 100644
--- a/cc/trees/layer_tree_host_pixeltest_masks.cc
+++ b/cc/trees/layer_tree_host_pixeltest_masks.cc
@@ -148,6 +148,27 @@ TEST_P(LayerTreeHostMasksPixelTest, MaskOfClippedLayer) {
base::FilePath(FILE_PATH_LITERAL("mask_of_clipped_layer.png")));
}
+TEST_P(LayerTreeHostMasksPixelTest, MaskOfLargerLayer) {
+ scoped_refptr<SolidColorLayer> background =
+ CreateSolidColorLayer(gfx::Rect(100, 100), SK_ColorWHITE);
+
+ scoped_refptr<SolidColorLayer> green = CreateSolidColorLayerWithBorder(
+ gfx::Rect(0, 0, 100, 100), kCSSGreen, 1, SK_ColorBLACK);
+ background->AddChild(green);
+
+ gfx::Size mask_bounds(40, 40);
+ MaskContentLayerClient client(mask_bounds);
+ scoped_refptr<PictureLayer> mask = PictureLayer::Create(&client);
+ mask->SetBounds(mask_bounds);
+ mask->SetIsDrawable(true);
+ mask->SetLayerMaskType(Layer::LayerMaskType::SINGLE_TEXTURE_MASK);
+ green->SetMaskLayer(mask.get());
+
+ RunPixelResourceTest(
+ background,
+ base::FilePath(FILE_PATH_LITERAL("mask_of_larger_layer.png")));
+}
+
class CheckerContentLayerClient : public ContentLayerClient {
public:
CheckerContentLayerClient(const gfx::Size& bounds,
« no previous file with comments | « cc/trees/effect_node.cc ('k') | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698