Filter outsets should be replaced by a per-effect function mapping between source and destination rects |
|||||
Issue descriptionThis is how Skia does it, and it's more general (it works for effects thatn do things like scale).
,
Apr 12 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/42b8b79d8538d508b2d660e3dab12e8d0839bfaf commit 42b8b79d8538d508b2d660e3dab12e8d0839bfaf Author: jbroman <jbroman@chromium.org> Date: Tue Apr 12 00:11:23 2016 Replace filter outsets with bounds mapping in Blink. This mirrors SkImageFilter::filterBounds, and is more flexible. Also included are some additional unit tests, and changes to layout test baselines: * css3/filters/effect-reference-repaint-offset.html Progression: now only repaints the offset area. * fast/repaint/* Minor: rounding for inexact values is more conservative (blur radius). BUG= 600821 Review URL: https://codereview.chromium.org/1855303002 Cr-Commit-Position: refs/heads/master@{#386527} [modify] https://crrev.com/42b8b79d8538d508b2d660e3dab12e8d0839bfaf/third_party/WebKit/LayoutTests/css3/filters/effect-reference-repaint-offset-expected.txt [modify] https://crrev.com/42b8b79d8538d508b2d660e3dab12e8d0839bfaf/third_party/WebKit/LayoutTests/fast/repaint/filter-invalidation-after-display-expected.txt [modify] https://crrev.com/42b8b79d8538d508b2d660e3dab12e8d0839bfaf/third_party/WebKit/LayoutTests/fast/repaint/filter-invalidation-with-composited-container-change-expected.txt [modify] https://crrev.com/42b8b79d8538d508b2d660e3dab12e8d0839bfaf/third_party/WebKit/LayoutTests/fast/repaint/filter-repaint-accelerated-child-with-filter-child-expected.txt [modify] https://crrev.com/42b8b79d8538d508b2d660e3dab12e8d0839bfaf/third_party/WebKit/LayoutTests/fast/repaint/filter-repaint-accelerated-on-accelerated-filter-expected.txt [modify] https://crrev.com/42b8b79d8538d508b2d660e3dab12e8d0839bfaf/third_party/WebKit/Source/core/frame/FrameView.cpp [modify] https://crrev.com/42b8b79d8538d508b2d660e3dab12e8d0839bfaf/third_party/WebKit/Source/core/layout/LayoutBox.cpp [modify] https://crrev.com/42b8b79d8538d508b2d660e3dab12e8d0839bfaf/third_party/WebKit/Source/core/paint/PaintLayer.cpp [modify] https://crrev.com/42b8b79d8538d508b2d660e3dab12e8d0839bfaf/third_party/WebKit/Source/core/paint/PaintLayer.h [modify] https://crrev.com/42b8b79d8538d508b2d660e3dab12e8d0839bfaf/third_party/WebKit/Source/platform/geometry/IntRect.h [modify] https://crrev.com/42b8b79d8538d508b2d660e3dab12e8d0839bfaf/third_party/WebKit/Source/platform/graphics/filters/FilterOperation.cpp [modify] https://crrev.com/42b8b79d8538d508b2d660e3dab12e8d0839bfaf/third_party/WebKit/Source/platform/graphics/filters/FilterOperation.h [modify] https://crrev.com/42b8b79d8538d508b2d660e3dab12e8d0839bfaf/third_party/WebKit/Source/platform/graphics/filters/FilterOperations.cpp [modify] https://crrev.com/42b8b79d8538d508b2d660e3dab12e8d0839bfaf/third_party/WebKit/Source/platform/graphics/filters/FilterOperations.h [modify] https://crrev.com/42b8b79d8538d508b2d660e3dab12e8d0839bfaf/third_party/WebKit/Source/platform/graphics/filters/FilterOperationsTest.cpp [modify] https://crrev.com/42b8b79d8538d508b2d660e3dab12e8d0839bfaf/third_party/WebKit/Source/platform/testing/GeometryPrinters.cpp [modify] https://crrev.com/42b8b79d8538d508b2d660e3dab12e8d0839bfaf/third_party/WebKit/Source/platform/testing/GeometryPrinters.h
,
Apr 12 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/29dab8e7a907cd5db664581f0543d169f2650329 commit 29dab8e7a907cd5db664581f0543d169f2650329 Author: jbroman <jbroman@chromium.org> Date: Tue Apr 12 20:47:22 2016 Implement cc::FilterOperations::MapRect. Unlike GetOutsets(), this is flexible enough to represent other kinds of mapping between filter source and destination rect, like scaling. BUG= 600821 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1867913002 Cr-Commit-Position: refs/heads/master@{#386801} [modify] https://crrev.com/29dab8e7a907cd5db664581f0543d169f2650329/cc/output/filter_operation.cc [modify] https://crrev.com/29dab8e7a907cd5db664581f0543d169f2650329/cc/output/filter_operation.h [modify] https://crrev.com/29dab8e7a907cd5db664581f0543d169f2650329/cc/output/filter_operations.cc [modify] https://crrev.com/29dab8e7a907cd5db664581f0543d169f2650329/cc/output/filter_operations.h [modify] https://crrev.com/29dab8e7a907cd5db664581f0543d169f2650329/cc/output/filter_operations_unittest.cc
,
Apr 19 2016
Issue 523534 has been merged into this issue.
,
May 20 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/6797dde5c989f574af49c2b5a81bb07a4491861e commit 6797dde5c989f574af49c2b5a81bb07a4491861e Author: jbroman <jbroman@chromium.org> Date: Fri May 20 18:59:55 2016 cc: Update SpreadForStdDeviation to 3*sigma, and update tests. A recent change (https://codereview.chromium.org/1980613003) updated one path to use 3*sigma as the estimated spread for gaussian blurs in filters. This propagates that change to the "filter outset" path, for consistency, and updates test results accordingly (including one visually-indistinguishable pixel diff). BUG= 600821 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review-Url: https://codereview.chromium.org/2004443002 Cr-Commit-Position: refs/heads/master@{#395126} [modify] https://crrev.com/6797dde5c989f574af49c2b5a81bb07a4491861e/cc/output/filter_operation.cc [modify] https://crrev.com/6797dde5c989f574af49c2b5a81bb07a4491861e/cc/output/filter_operations.cc [modify] https://crrev.com/6797dde5c989f574af49c2b5a81bb07a4491861e/cc/output/filter_operations_unittest.cc [modify] https://crrev.com/6797dde5c989f574af49c2b5a81bb07a4491861e/cc/test/data/background_filter_rotated_gl.png [modify] https://crrev.com/6797dde5c989f574af49c2b5a81bb07a4491861e/cc/trees/layer_tree_host_common_unittest.cc
,
Jun 1 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/8eb5fb7cc39a640ed6b732262c41e3110c9093d2 commit 8eb5fb7cc39a640ed6b732262c41e3110c9093d2 Author: jbroman <jbroman@chromium.org> Date: Wed Jun 01 18:44:16 2016 cc: Move DamageTracker filter handling to MapRect. While here, also fix a bug in which the rectangle in which the filter is assumed to be visible was also mapped through the filter, and update unit tests accordingly. BUG= 600821 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review-Url: https://codereview.chromium.org/2015343002 Cr-Commit-Position: refs/heads/master@{#397192} [modify] https://crrev.com/8eb5fb7cc39a640ed6b732262c41e3110c9093d2/cc/trees/damage_tracker.cc [modify] https://crrev.com/8eb5fb7cc39a640ed6b732262c41e3110c9093d2/cc/trees/damage_tracker_unittest.cc
,
Jun 6 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/1c44d5b5ff7b1c422b75f2d68e409583db0a71bc commit 1c44d5b5ff7b1c422b75f2d68e409583db0a71bc Author: jbroman <jbroman@chromium.org> Date: Mon Jun 06 21:19:30 2016 cc: Use FilterOperations::MapRect in RenderSurfaceImpl::DrawableContentRect. GetOutsets provided imprecise -- or possibly incorrect -- outsets for certain reference filters, such as <feOffset>. Instead RenderSurfaceImpl should explicitly specify that it wants forward mapping here. Also fix this to incorporate scale factors in the filter rect calculations (e.g. due to a high DPI display), and add unit tests. BUG= 600821 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review-Url: https://codereview.chromium.org/2018983003 Cr-Commit-Position: refs/heads/master@{#398126} [modify] https://crrev.com/1c44d5b5ff7b1c422b75f2d68e409583db0a71bc/cc/layers/render_surface_impl.cc [modify] https://crrev.com/1c44d5b5ff7b1c422b75f2d68e409583db0a71bc/cc/trees/layer_tree_host_common_unittest.cc
,
Jun 29 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/ca9b612516efc2af1143c09a4d67f5b99e566c79 commit ca9b612516efc2af1143c09a4d67f5b99e566c79 Author: jbroman <jbroman@chromium.org> Date: Wed Jun 29 23:04:30 2016 cc: Implement and use FilterOperations::MapRectReverse for mapping backdrop bounding box. This is more precise than GetFilterOutsets (e.g. in the case of an SVG <feOffset> filter), and more correct if a filter contains a scale, even by -1. BUG= 600821 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review-Url: https://codereview.chromium.org/1998233002 Cr-Commit-Position: refs/heads/master@{#402974} [modify] https://crrev.com/ca9b612516efc2af1143c09a4d67f5b99e566c79/cc/output/filter_operation.cc [modify] https://crrev.com/ca9b612516efc2af1143c09a4d67f5b99e566c79/cc/output/filter_operation.h [modify] https://crrev.com/ca9b612516efc2af1143c09a4d67f5b99e566c79/cc/output/filter_operations.cc [modify] https://crrev.com/ca9b612516efc2af1143c09a4d67f5b99e566c79/cc/output/filter_operations.h [modify] https://crrev.com/ca9b612516efc2af1143c09a4d67f5b99e566c79/cc/output/filter_operations_unittest.cc [modify] https://crrev.com/ca9b612516efc2af1143c09a4d67f5b99e566c79/cc/output/gl_renderer.cc [modify] https://crrev.com/ca9b612516efc2af1143c09a4d67f5b99e566c79/cc/output/software_renderer.cc [add] https://crrev.com/ca9b612516efc2af1143c09a4d67f5b99e566c79/cc/test/data/offset_background_filter_1x.png [add] https://crrev.com/ca9b612516efc2af1143c09a4d67f5b99e566c79/cc/test/data/offset_background_filter_2x.png [modify] https://crrev.com/ca9b612516efc2af1143c09a4d67f5b99e566c79/cc/trees/layer_tree_host_pixeltest_filters.cc
,
Jul 6 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/56c1f9cdc298320967bc3924d963f37ff202457e commit 56c1f9cdc298320967bc3924d963f37ff202457e Author: jbroman <jbroman@chromium.org> Date: Wed Jul 06 19:08:10 2016 cc: Remove uses of FilterOperations::GetOutsets in unit tests. The mapping from sigma to total spread was previously complicated, but it is now a straightforward multiplication by 3. This can just be embedded in the expected values in the tests. Some expressions have been fully evaluated; more complicated ones have only been simplified, but have a single variable for the blur spread left intact. BUG= 600821 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review-Url: https://codereview.chromium.org/2124983003 Cr-Commit-Position: refs/heads/master@{#403938} [modify] https://crrev.com/56c1f9cdc298320967bc3924d963f37ff202457e/cc/trees/damage_tracker_unittest.cc [modify] https://crrev.com/56c1f9cdc298320967bc3924d963f37ff202457e/cc/trees/occlusion_tracker_unittest.cc
,
Jul 7 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/e29d64cfae00a48483cc6497d39fb822c807a83a commit e29d64cfae00a48483cc6497d39fb822c807a83a Author: jbroman <jbroman@chromium.org> Date: Thu Jul 07 00:27:55 2016 cc: Fix a bug where filter outsets for drop-shadow could be negative. The drop shadow filter draws the original content as well as its shadow, so it should never have negative filter outsets (i.e. applying the filter always produces output with bounds enclosing the original content). While FilterOperations::GetOutsets will likely be removed shortly, there is still code relying on it. Additionally, this gives a good excuse to add a unit test for FilterOperations::MapRect/MapRectReverse, confirming that it does not have the same issue. BUG= 600821 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review-Url: https://codereview.chromium.org/2115163002 Cr-Commit-Position: refs/heads/master@{#404009} [modify] https://crrev.com/e29d64cfae00a48483cc6497d39fb822c807a83a/cc/output/filter_operations.cc [modify] https://crrev.com/e29d64cfae00a48483cc6497d39fb822c807a83a/cc/output/filter_operations_unittest.cc
,
Jul 7 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/19a18b17a0596d17fb7e4d6242c375518ba9a0db commit 19a18b17a0596d17fb7e4d6242c375518ba9a0db Author: jbroman <jbroman@chromium.org> Date: Thu Jul 07 02:37:38 2016 cc: Correct inverted directions in occlusion tracker background filter logic. While this logic is correct for symmetric filters, such as blur, it is not correct for asymmetric ones, such as drop-shadow. In these cases, the affected area should be expanded, but since the pixel-moving is not due to pixels in the occlusion, but rather due to pixels outside the occlusion moving into it, the left edge of the affected area should be expanded with the right outset (and so on). A followup CL will update this logic again (to generalize it and remove the use of FilterOperations::GetOutsets, but correcting it (with a unit test) allows the behaviour change to be separated from the refactor. BUG= 600821 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review-Url: https://codereview.chromium.org/2119043002 Cr-Commit-Position: refs/heads/master@{#404034} [modify] https://crrev.com/19a18b17a0596d17fb7e4d6242c375518ba9a0db/cc/trees/occlusion_tracker.cc [modify] https://crrev.com/19a18b17a0596d17fb7e4d6242c375518ba9a0db/cc/trees/occlusion_tracker_unittest.cc
,
Jul 11 2016
The following revision refers to this bug: https://skia.googlesource.com/skia.git/+/203a993c77ea146e0a4e7f1e0c079cc79fd09167 commit 203a993c77ea146e0a4e7f1e0c079cc79fd09167 Author: jbroman <jbroman@chromium.org> Date: Mon Jul 11 21:07:59 2016 Handle negative scale in SkDropShadowImageFilter::onFilterNodeBounds. Add unit tests for positive and negative scale factors for the two effects that apply a Gaussian blur like this: blur and drop-shadow. The last two assertions fail without the fix in SkDropShadowImageFilter. BUG= chromium:600821 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2114313002 Review-Url: https://codereview.chromium.org/2114313002 [modify] https://crrev.com/203a993c77ea146e0a4e7f1e0c079cc79fd09167/src/effects/SkDropShadowImageFilter.cpp [modify] https://crrev.com/203a993c77ea146e0a4e7f1e0c079cc79fd09167/tests/ImageFilterTest.cpp
,
Jul 12 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/081263f2a6461050c8a92a8db9aa874e0fc6b449 commit 081263f2a6461050c8a92a8db9aa874e0fc6b449 Author: skia-deps-roller <skia-deps-roller@chromium.org> Date: Tue Jul 12 21:39:38 2016 Roll src/third_party/skia/ c90bc40fd..f119796f9 (17 commits). https://chromium.googlesource.com/skia.git/+log/c90bc40fdd7f..f119796f95f3 $ git log c90bc40fd..f119796f9 --date=short --no-merges --format='%ad %ae %s' 2016-07-12 halcanary tools/SkShaper: SkStream->blob 2016-07-12 fmenozzi Add hard stop count 2016-07-12 liyuqian Update documents/scripts for SampleApp removal 2016-07-12 reed remove unused parameter to make android happy (when this header is moved to private) 2016-07-12 brianosman Respect --match for samples and jpgs in viewer 2016-07-12 ethannicholas SkSL performance improvements (plus a couple of minor warning fixes) GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2131223002 2016-07-12 bungeman Use hintgasp font when testing rendering. 2016-07-12 msarett Revert of Pre-crop filled rects to avoid scissor (patchset #6 id:100001 of https://codereview.chromium.org/2132073002/ ) 2016-07-11 halcanary tools/fiddle: remove unused fiddler.go 2016-07-11 msarett Revert of try to speed-up maprect + round2i + contains (patchset #8 id:140001 of https://codereview.chromium.org/2133413002/ ) 2016-07-11 msarett Revert of Fix compile error on MSAN bot (patchset #1 id:1 of https://codereview.chromium.org/2142653002/ ) 2016-07-11 msarett Fix compile error on MSAN bot 2016-07-11 csmartdalton Pre-crop filled rects to avoid scissor 2016-07-11 halcanary tools/SkShaper: factor shaping out of using_skia_and_harfbuzz 2016-07-11 jbroman Handle negative scale in SkDropShadowImageFilter::onFilterNodeBounds. 2016-07-11 reed try to speed-up maprect + round2i + contains 2016-07-11 mtklein hacking on a single-benchmark tool BUG= 600821 NOTRY=true CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_blink_rel TBR=msarett@google.com Review-Url: https://codereview.chromium.org/2144663002 Cr-Commit-Position: refs/heads/master@{#404837} [modify] https://crrev.com/081263f2a6461050c8a92a8db9aa874e0fc6b449/DEPS
,
Jul 18 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/09a522240fb06e640d20a44681ab99c1fb9a20b2 commit 09a522240fb06e640d20a44681ab99c1fb9a20b2 Author: jbroman <jbroman@chromium.org> Date: Mon Jul 18 19:44:53 2016 cc: Add unit tests for non-identity matrix for FilterOperation::MapRect. Also fix a bug where the drop shadow offset did not account for scale in this matrix (e.g. due to high DPI). BUG= 600821 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review-Url: https://codereview.chromium.org/2114303002 Cr-Commit-Position: refs/heads/master@{#406069} [modify] https://crrev.com/09a522240fb06e640d20a44681ab99c1fb9a20b2/cc/output/filter_operation.cc [modify] https://crrev.com/09a522240fb06e640d20a44681ab99c1fb9a20b2/cc/output/filter_operations_unittest.cc
,
Apr 5 2017
,
May 24 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/92ee490845d92f5159028b4ed80b4e4fe5db545f commit 92ee490845d92f5159028b4ed80b4e4fe5db545f Author: yiyix <yiyix@chromium.org> Date: Wed May 24 15:18:42 2017 cc: Correct inverted directions in occlusion tracker background filter logic The filter's bounds for asymmetric filters (ex: background filter) are relative to the target surface, which moves the pixels from outside of the clip to the filtered surface. As a result, |affected_area| needs to expand. Since we are concerned with the target surface, we need to swap the outsets before applying them to the filtered surface bounds. BUG= 600821 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel Review-Url: https://codereview.chromium.org/2892073002 Cr-Commit-Position: refs/heads/master@{#474291} [modify] https://crrev.com/92ee490845d92f5159028b4ed80b4e4fe5db545f/cc/trees/occlusion_tracker.cc
,
Sep 8 2017
My ongoing work seems to cover this. FilterOperations::GetOutsets() will be further broken by the upcoming optimization of SkImageFilter::filterBounds() (https://skia-review.googlesource.com/c/skia/+/38921). jbroman@ are you still working on this? If not, feel free to assign it to me. Besides, any comments to https://skia-review.googlesource.com/c/skia/+/38921 are welcome :)
,
Sep 8 2017
,
Sep 14 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/1507f44c95fbad44e03cd021bbe80f138cfd3fb3 commit 1507f44c95fbad44e03cd021bbe80f138cfd3fb3 Author: Xianzhu Wang <wangxianzhu@chromium.org> Date: Thu Sep 14 22:45:29 2017 Delete FilterOperations::GetOutsets() and replace callsite with MapRect[Reverse] GetOutsets() doesn't work for outsets depending on the source/dest rect. Bug: 600821 Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel Change-Id: Ica892711e0a7d59f655a558090ddebd48d49c585 Reviewed-on: https://chromium-review.googlesource.com/659037 Reviewed-by: Vladimir Levin <vmpstr@chromium.org> Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org> Cr-Commit-Position: refs/heads/master@{#502059} [modify] https://crrev.com/1507f44c95fbad44e03cd021bbe80f138cfd3fb3/cc/base/filter_operations.cc [modify] https://crrev.com/1507f44c95fbad44e03cd021bbe80f138cfd3fb3/cc/base/filter_operations.h [modify] https://crrev.com/1507f44c95fbad44e03cd021bbe80f138cfd3fb3/cc/base/filter_operations_unittest.cc [modify] https://crrev.com/1507f44c95fbad44e03cd021bbe80f138cfd3fb3/cc/trees/occlusion_tracker.cc
,
Sep 14 2017
|
|||||
►
Sign in to add a comment |
|||||
Comment 1 by jbroman@chromium.org
, Apr 5 2016