Chromium Code Reviews
Help | Chromium Project | Sign in
(4)

Issue 2828353003: Determine mask UVs based on texture size

Can't Edit
Can't Publish+Mail
Start Review
Created:
1 week, 2 days ago by ericrk
Modified:
1 week, 1 day ago
Reviewers:
sunxd, enne
CC:
cc-bugs_chromium.org, chromium-reviews
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Determine mask UVs based on texture size Currently, mask SINGLE_TEXTURE_MASK UVs are determined based on the size of the masked layer. This means that if the mask layer size mismatches the masked layer size, the mask is stretched to cover the masked layer. This behavior is currently unused. The only uses of mask layers come from Blink, and all uses in Blink appear to match the mask layer size to the masked layer size. Additionally, this behavior does not match MULTI_TEXTURE_MASKs, which do not stretch to cover the masked layer. As this behavior is unused and inconsistent, this change simplifies masking logic to determine mask UVs based on mask texture size. This has the added benefit of ensuring that masks can be used with texture sizes that don't exactly match the mask layer size. R=sunxd@chromium.org, enne@chromium.org BUG=713872 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel

Patch Set 1 #

Total comments: 1

Patch Set 2 : Add tolerance to filter_effects.html #

Unified diffs Side-by-side diffs Delta from patch set Stats (+48 lines, -22 lines) Patch
M cc/layers/layer.h View 1 chunk +1 line, -0 lines 0 comments Download
M cc/layers/render_surface_impl.cc View 1 chunk +3 lines, -6 lines 0 comments Download
M cc/layers/render_surface_impl_unittest.cc View 2 chunks +9 lines, -5 lines 0 comments Download
A cc/test/data/mask_of_larger_layer.png View Binary file 0 comments Download
M cc/test/fake_mask_layer_impl.h View 1 chunk +5 lines, -0 lines 0 comments Download
M cc/test/fake_mask_layer_impl.cc View 1 chunk +1 line, -0 lines 0 comments Download
M cc/trees/effect_node.h View 1 chunk +0 lines, -2 lines 0 comments Download
M cc/trees/effect_node.cc View 1 chunk +0 lines, -1 line 0 comments Download
M cc/trees/layer_tree_host_pixeltest_masks.cc View 1 chunk +21 lines, -0 lines 0 comments Download
M cc/trees/layer_tree_host_unittest.cc View 4 chunks +6 lines, -6 lines 0 comments Download
M cc/trees/property_tree_builder.cc View 1 chunk +0 lines, -1 line 0 comments Download
M content/test/gpu/gpu_tests/pixel_test_pages.py View 1 1 chunk +2 lines, -1 line 0 comments Download
Commit queue not available (can’t edit this change).

Messages

Total messages: 14 (11 generated)
ericrk
This is the precursor to allowing CC tiles to re-use larger resources for raster.
1 week, 2 days ago (2017-04-20 21:52:22 UTC) #4
enne
lgtm Thanks for all the investigation. https://codereview.chromium.org/2828353003/diff/1/cc/trees/layer_tree_host_pixeltest_masks.cc File cc/trees/layer_tree_host_pixeltest_masks.cc (right): https://codereview.chromium.org/2828353003/diff/1/cc/trees/layer_tree_host_pixeltest_masks.cc#newcode151 cc/trees/layer_tree_host_pixeltest_masks.cc:151: TEST_P(LayerTreeHostMasksPixelTest, MaskOfLargerLayer) { ...
1 week, 2 days ago (2017-04-20 22:44:08 UTC) #8
sunxd
1 week, 1 day ago (2017-04-21 16:08:07 UTC) #9
On 2017/04/20 22:44:08, enne wrote:
> lgtm
> 
> Thanks for all the investigation.
> 
>
https://codereview.chromium.org/2828353003/diff/1/cc/trees/layer_tree_host_pi...
> File cc/trees/layer_tree_host_pixeltest_masks.cc (right):
> 
>
https://codereview.chromium.org/2828353003/diff/1/cc/trees/layer_tree_host_pi...
> cc/trees/layer_tree_host_pixeltest_masks.cc:151:
> TEST_P(LayerTreeHostMasksPixelTest, MaskOfLargerLayer) {
> Thanks for the test!

lgtm. I think now the logic how we scale mask uv rect from coverage space to
normalized space is unified between single and multi texture masks.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld cc6ac46