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

Issue 1517693002: Accelerated filters should filter unpadded primitives. (Closed)

Created:
5 years ago by Stephen White
Modified:
4 years, 11 months ago
Reviewers:
enne (OOO)
CC:
enne (OOO), blink-reviews, blink-reviews-paint_chromium.org, cc-bugs_chromium.org, chromium-reviews, danakj, dshwang, slimming-paint-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Accelerated filters should filter unpadded primitives. Until recently, the Skia image filter infrastructure could only produce a result image of the same size as its input image. For that reason, currently Blink applies filter outsets to a layer before it passes the layer to cc. So cc sees a layer padded with transparent black out to the filter outsets, but has no idea how big the original layer was. It then passes that to Skia, which produces an image of the same size. I've recently fixed Skia to be able to correctly draw from the original (unpadded) texture size to the correct, padded texture size. But to take advantage of that, we need Blink to stop padding the texture (see PaintLayer). This may result in a destination buffer which is of a different size than the source, so we modify cc's drawing to draw the destination rect. Also, since we're giving the original (unmodified) source rect to Skia, we no longer need to offset the crop rects in Blink by the delta between the src and dest rects. (Note: we can thus remove the crop offset stuff entirely from Blink, which I'll do in a followup patch.) Finally, note that the workaround for the partially-occupied textures implemented (implemented in https://codereview.chromium.org/909353003) was no longer working when drawing to exact-size textures, due to a bug in SkAlphaThresholdFilter. This is fixed in Skia here: https://codereview.chromium.org/1609573002/. That will be required to roll into Chrome before this patch can be landed. BUG=568196 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Committed: https://crrev.com/38858c57782f2a32cf4f93fcfcc35c340e665be4 Cr-Commit-Position: refs/heads/master@{#370523}

Patch Set 1 #

Patch Set 2 : Update to ToT #

Patch Set 3 : Fix bad rebase #

Patch Set 4 : Fix filter subregion: apply crop offset during processing, not during filter building. #

Patch Set 5 : Fix HiDPI #

Patch Set 6 : Fix background filters #

Patch Set 7 : Simplify matrix math a bit #

Patch Set 8 : Do computeFastBounds() more selectively; fix y_offset issue #

Patch Set 9 : Update to ToT; clean up background filter handling #

Patch Set 10 : Tweak background filters code back a bit #

Patch Set 11 : Only expand for filter outsets for software-processed filters #

Patch Set 12 : Updated repaint baselines #

Patch Set 13 : Expand the RenderSurface's drawable_content_rect for filter outsets. #

Total comments: 7

Patch Set 14 : Add unit test for render surface size adjustment #

Patch Set 15 : Add two child layers and a scale to the unit test #

Patch Set 16 : Fix style #

Patch Set 17 : Add comment #

Patch Set 18 : Fix comment #

Patch Set 19 : Fix mix-blend-mode and filters #

Patch Set 20 : Do background rect outsetting before window intersection #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+230 lines, -82 lines) Patch
M cc/layers/render_surface_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +5 lines, -0 lines 0 comments Download
M cc/output/gl_renderer.h View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -1 line 0 comments Download
M cc/output/gl_renderer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 11 chunks +59 lines, -23 lines 1 comment Download
M cc/output/renderer_pixeltest.cc View 1 2 3 4 5 1 chunk +5 lines, -5 lines 0 comments Download
A cc/test/data/enlarged_texture_on_crop_offset.png View 1 2 3 4 5 6 7 Binary file 0 comments Download
M cc/trees/layer_tree_host_common_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +41 lines, -0 lines 0 comments Download
M cc/trees/layer_tree_host_pixeltest_filters.cc View 1 2 3 4 5 6 7 2 chunks +54 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/TestExpectations View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +16 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/compositing/filters/sw-layer-overlaps-hw-shadow-expected.txt View 1 2 3 4 5 6 7 8 9 10 1 chunk +3 lines, -3 lines 0 comments Download
M third_party/WebKit/LayoutTests/compositing/filters/sw-shadow-overlaps-hw-layer-expected.txt View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/compositing/filters/sw-shadow-overlaps-hw-shadow-expected.txt View 1 2 3 4 5 6 7 8 9 10 1 chunk +5 lines, -4 lines 0 comments Download
M third_party/WebKit/LayoutTests/compositing/squashing/no-squashing-for-filters-expected.txt View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/css3/filters/composited-layer-bounds-after-sw-blur-animation-expected.txt View 1 2 3 4 5 6 7 8 9 10 1 chunk +3 lines, -3 lines 0 comments Download
M third_party/WebKit/LayoutTests/css3/filters/composited-layer-bounds-with-composited-blur-expected.txt View 1 2 3 4 5 6 7 8 9 10 1 chunk +3 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/css3/filters/composited-layer-child-bounds-after-composited-to-sw-shadow-change-expected.txt View 1 2 3 4 5 6 7 8 9 10 2 chunks +6 lines, -8 lines 0 comments Download
M third_party/WebKit/LayoutTests/css3/filters/composited-layer-promotion-after-outset-overlap-change-using-composited-shadow-expected.txt View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/css3/filters/composited-layer-promotion-after-outset-overlap-change-using-sw-shadow-expected.txt View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/repaint/filter-invalidation-with-composited-container-change-expected.txt View 1 2 3 4 5 6 7 8 9 10 1 chunk +4 lines, -3 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/repaint/filter-repaint-accelerated-child-with-filter-child-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +3 lines, -3 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/repaint/filter-repaint-accelerated-on-accelerated-filter-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +6 lines, -7 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/repaint/filter-repaint-on-accelerated-layer-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/animation/AnimationTranslationUtil.cpp View 1 2 3 1 chunk +0 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/paint/PaintLayer.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +5 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp View 1 2 3 4 5 6 7 8 2 chunks +0 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/filters/SkiaImageFilterBuilder.h View 1 2 3 1 chunk +0 lines, -2 lines 0 comments Download

Messages

Total messages: 33 (13 generated)
reed1
glad we're trying to remove the client-side padding. I'd prefer we either before, or at ...
5 years ago (2015-12-10 15:38:12 UTC) #4
Stephen White
On 2015/12/10 15:38:12, reed1 wrote: > glad we're trying to remove the client-side padding. > ...
5 years ago (2015-12-10 15:44:11 UTC) #5
Stephen White
On 2015/12/10 15:44:11, Stephen White wrote: > On 2015/12/10 15:38:12, reed1 wrote: > > glad ...
5 years ago (2015-12-10 15:58:02 UTC) #6
reed1
I think sprite->image cl was blocked on 3 layouttests where the blurs were different. I ...
5 years ago (2015-12-10 16:19:59 UTC) #7
Stephen White
On 2015/12/10 16:19:59, reed1 wrote: > I think sprite->image cl was blocked on 3 layouttests ...
5 years ago (2015-12-10 22:17:34 UTC) #8
chromium-reviews
Will return my CL to see the remaining diffs if any. On Thu, Dec 10, ...
5 years ago (2015-12-10 22:20:23 UTC) #9
blink-reviews
Will return my CL to see the remaining diffs if any. On Thu, Dec 10, ...
5 years ago (2015-12-10 22:20:23 UTC) #10
Stephen White
WIP: at patch set #5, layout tests are now all passing (modulo improvements in correctness ...
4 years, 11 months ago (2016-01-14 16:47:13 UTC) #11
Stephen White
enne@: PTAL. Thanks!
4 years, 11 months ago (2016-01-19 23:04:11 UTC) #15
enne (OOO)
https://codereview.chromium.org/1517693002/diff/240001/cc/layers/render_surface_impl.cc File cc/layers/render_surface_impl.cc (right): https://codereview.chromium.org/1517693002/diff/240001/cc/layers/render_surface_impl.cc#newcode56 cc/layers/render_surface_impl.cc:56: drawable_content_rect.Inset(-left, -top, -right, -bottom); Should you do this before ...
4 years, 11 months ago (2016-01-19 23:21:19 UTC) #17
enne (OOO)
https://codereview.chromium.org/1517693002/diff/240001/cc/layers/render_surface_impl.cc File cc/layers/render_surface_impl.cc (right): https://codereview.chromium.org/1517693002/diff/240001/cc/layers/render_surface_impl.cc#newcode56 cc/layers/render_surface_impl.cc:56: drawable_content_rect.Inset(-left, -top, -right, -bottom); Should you do this before ...
4 years, 11 months ago (2016-01-19 23:21:20 UTC) #18
Stephen White
Thanks for your review. https://codereview.chromium.org/1517693002/diff/240001/cc/layers/render_surface_impl.cc File cc/layers/render_surface_impl.cc (right): https://codereview.chromium.org/1517693002/diff/240001/cc/layers/render_surface_impl.cc#newcode56 cc/layers/render_surface_impl.cc:56: drawable_content_rect.Inset(-left, -top, -right, -bottom); On ...
4 years, 11 months ago (2016-01-19 23:59:10 UTC) #19
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1517693002/290001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1517693002/290001
4 years, 11 months ago (2016-01-20 00:49:02 UTC) #21
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1517693002/320001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1517693002/320001
4 years, 11 months ago (2016-01-20 01:16:19 UTC) #23
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/161473)
4 years, 11 months ago (2016-01-20 02:48:55 UTC) #25
Stephen White
New patch up; all tests passing. PTAL. https://codereview.chromium.org/1517693002/diff/240001/cc/layers/render_surface_impl.cc File cc/layers/render_surface_impl.cc (right): https://codereview.chromium.org/1517693002/diff/240001/cc/layers/render_surface_impl.cc#newcode56 cc/layers/render_surface_impl.cc:56: drawable_content_rect.Inset(-left, -top, ...
4 years, 11 months ago (2016-01-20 19:59:01 UTC) #26
enne (OOO)
> -webkit-box-reflect is non-standard, and doesn't seem to have a spec, so I couldn't verify ...
4 years, 11 months ago (2016-01-20 22:59:29 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1517693002/360001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1517693002/360001
4 years, 11 months ago (2016-01-20 23:03:50 UTC) #29
commit-bot: I haz the power
Committed patchset #20 (id:360001)
4 years, 11 months ago (2016-01-20 23:15:11 UTC) #31
commit-bot: I haz the power
4 years, 11 months ago (2016-01-20 23:16:04 UTC) #33
Message was sent while issue was closed.
Patchset 20 (id:??) landed as
https://crrev.com/38858c57782f2a32cf4f93fcfcc35c340e665be4
Cr-Commit-Position: refs/heads/master@{#370523}

Powered by Google App Engine
This is Rietveld 408576698