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

Issue 14244021: cc: Remove incorrect dcheck for masks. (Closed)

Created:
7 years, 8 months ago by danakj
Modified:
7 years, 8 months ago
Reviewers:
shawnsingh, enne (OOO)
CC:
chromium-reviews, cc-bugs_chromium.org, backer, piman
Visibility:
Public.

Description

cc: Remove incorrect dcheck for masks. If a layer has a replica, which has a mask, then the layer itself does not need to clip to its bounding box. This dcheck verified that it would. Add some new unit tests and pixel tests that verify behaviour of the mask texture with masked replicas. The current behaviour is correct. The replica is masked at the origin of the replicated layer. Tests: LayerTreeHostImplTest.ReflectionMaskLayerWithDifferentBounds LayerTreeHostImplTest.ReflectionMaskLayerForSurfaceWithUnclippedChild LayerTreeHostImplTest.MaskLayerForSurfaceWithClippedLayer LayerTreeHostMasksPixelTest.MaskOfLayer LayerTreeHostMasksPixelTest.ImageMaskOfLayer LayerTreeHostMasksPixelTest.MaskOfClippedLayer LayerTreeHostMasksPixelTest.MaskWithReplica LayerTreeHostMasksPixelTest.MaskWithReplicaOfClippedLayer LayerTreeHostMasksPixelTest.MaskOfReplica LayerTreeHostMasksPixelTest.MaskOfReplicaOfClippedLayer R=enne BUG=171734 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=194639

Patch Set 1 #

Total comments: 7

Patch Set 2 : Better patch #

Patch Set 3 : #

Patch Set 4 : #

Total comments: 14

Patch Set 5 : With pixel tests #

Unified diffs Side-by-side diffs Delta from patch set Stats (+668 lines, -39 lines) Patch
M cc/cc_tests.gyp View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M cc/layers/render_surface_impl.cc View 1 2 3 4 1 chunk +5 lines, -6 lines 0 comments Download
M cc/test/layer_tree_pixel_test.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M cc/trees/layer_tree_host_impl_unittest.cc View 1 2 3 4 11 chunks +392 lines, -32 lines 0 comments Download
A cc/trees/layer_tree_host_pixeltest_masks.cc View 1 2 3 4 1 chunk +269 lines, -0 lines 0 comments Download

Messages

Total messages: 18 (0 generated)
danakj
https://codereview.chromium.org/14244021/diff/1/cc/trees/layer_tree_host_impl_unittest.cc File cc/trees/layer_tree_host_impl_unittest.cc (right): https://codereview.chromium.org/14244021/diff/1/cc/trees/layer_tree_host_impl_unittest.cc#newcode4508 cc/trees/layer_tree_host_impl_unittest.cc:4508: }, { These are for cpplint.
7 years, 8 months ago (2013-04-15 20:50:51 UTC) #1
enne (OOO)
+shawnsingh
7 years, 8 months ago (2013-04-15 22:05:28 UTC) #2
enne (OOO)
https://codereview.chromium.org/14244021/diff/1/cc/trees/layer_tree_host_impl_unittest.cc File cc/trees/layer_tree_host_impl_unittest.cc (right): https://codereview.chromium.org/14244021/diff/1/cc/trees/layer_tree_host_impl_unittest.cc#newcode5164 cc/trees/layer_tree_host_impl_unittest.cc:5164: // Applying a different contents scale to the mask ...
7 years, 8 months ago (2013-04-15 22:20:40 UTC) #3
danakj
I've updated the CL a bunch. It should now handle properly: 1) Mask layer with ...
7 years, 8 months ago (2013-04-16 02:49:02 UTC) #4
danakj
I also didn't see a test for the case where the surface is clipped, so ...
7 years, 8 months ago (2013-04-16 02:49:56 UTC) #5
enne (OOO)
WTB pixel tests so that correctness is more obvious https://codereview.chromium.org/14244021/diff/13001/cc/layers/render_surface_impl.cc File cc/layers/render_surface_impl.cc (right): https://codereview.chromium.org/14244021/diff/13001/cc/layers/render_surface_impl.cc#newcode257 cc/layers/render_surface_impl.cc:257: ...
7 years, 8 months ago (2013-04-16 21:06:44 UTC) #6
danakj
https://codereview.chromium.org/14244021/diff/13001/cc/layers/render_surface_impl.cc File cc/layers/render_surface_impl.cc (right): https://codereview.chromium.org/14244021/diff/13001/cc/layers/render_surface_impl.cc#newcode257 cc/layers/render_surface_impl.cc:257: gfx::SizeF clipped_mask_target_size = gfx::IntersectRects( On 2013/04/16 21:06:44, enne wrote: ...
7 years, 8 months ago (2013-04-16 21:21:00 UTC) #7
danakj
On 2013/04/16 21:21:00, danakj wrote: > The only behaviour change in this CL > is ...
7 years, 8 months ago (2013-04-16 21:23:09 UTC) #8
danakj
On 2013/04/16 21:06:44, enne wrote: > WTB pixel tests so that correctness is more obvious ...
7 years, 8 months ago (2013-04-16 21:23:31 UTC) #9
enne (OOO)
On 2013/04/16 21:23:31, danakj wrote: > On 2013/04/16 21:06:44, enne wrote: > > WTB pixel ...
7 years, 8 months ago (2013-04-16 21:26:10 UTC) #10
shawnsingh
https://codereview.chromium.org/14244021/diff/13001/cc/layers/render_surface_impl.cc File cc/layers/render_surface_impl.cc (right): https://codereview.chromium.org/14244021/diff/13001/cc/layers/render_surface_impl.cc#newcode257 cc/layers/render_surface_impl.cc:257: gfx::SizeF clipped_mask_target_size = gfx::IntersectRects( > If another layer makes ...
7 years, 8 months ago (2013-04-16 23:08:26 UTC) #11
danakj
https://codereview.chromium.org/14244021/diff/13001/cc/layers/render_surface_impl.cc File cc/layers/render_surface_impl.cc (right): https://codereview.chromium.org/14244021/diff/13001/cc/layers/render_surface_impl.cc#newcode257 cc/layers/render_surface_impl.cc:257: gfx::SizeF clipped_mask_target_size = gfx::IntersectRects( On 2013/04/16 23:08:26, shawnsingh wrote: ...
7 years, 8 months ago (2013-04-16 23:13:55 UTC) #12
danakj
Now with pixeltests! Here's the pixel results: LayerTreeHostMasksPixelTest.MaskOfLayer http://i.imgur.com/jUZlczes.jpg LayerTreeHostMasksPixelTest.ImageMaskOfLayer http://imgur.com/kbSiqkI LayerTreeHostMasksPixelTest.MaskOfClippedLayer http://imgur.com/aXpU4n3 LayerTreeHostMasksPixelTest.MaskWithReplica http://imgur.com/RROCNSi ...
7 years, 8 months ago (2013-04-17 00:04:49 UTC) #13
danakj
On 2013/04/17 00:04:49, danakj wrote: > Now with pixeltests! Here's the pixel results: > > ...
7 years, 8 months ago (2013-04-17 00:06:18 UTC) #14
enne (OOO)
https://codereview.chromium.org/14244021/diff/13001/cc/trees/layer_tree_host_impl_unittest.cc File cc/trees/layer_tree_host_impl_unittest.cc (right): https://codereview.chromium.org/14244021/diff/13001/cc/trees/layer_tree_host_impl_unittest.cc#newcode5308 cc/trees/layer_tree_host_impl_unittest.cc:5308: EXPECT_EQ(gfx::RectF(-0.5f, 0.f, 1.f, 1.f).ToString(), On 2013/04/16 21:21:01, danakj wrote: ...
7 years, 8 months ago (2013-04-17 16:24:40 UTC) #15
danakj
https://codereview.chromium.org/14244021/diff/13001/cc/trees/layer_tree_host_impl_unittest.cc File cc/trees/layer_tree_host_impl_unittest.cc (right): https://codereview.chromium.org/14244021/diff/13001/cc/trees/layer_tree_host_impl_unittest.cc#newcode5308 cc/trees/layer_tree_host_impl_unittest.cc:5308: EXPECT_EQ(gfx::RectF(-0.5f, 0.f, 1.f, 1.f).ToString(), On 2013/04/17 16:24:40, enne wrote: ...
7 years, 8 months ago (2013-04-17 16:55:59 UTC) #16
enne (OOO)
lgtm to land this and fix this one bug. You filed a follow-up, so we ...
7 years, 8 months ago (2013-04-17 17:45:13 UTC) #17
danakj
7 years, 8 months ago (2013-04-17 18:49:00 UTC) #18
Message was sent while issue was closed.
Committed patchset #5 manually as r194639 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698