Go to file
Xianzhu Wang 0fa353c6c2 Optimize filterBounds() of SkArithmeticImageFilter/SkXfermodeImageFilter
This brings the optimization in blink's FEComposit::MapRect() [1]
into skia.

Previously for these classes we used the default SkImageFilter::
onFilterBounds() which returns the union of the bounds of input filters.
However, this was not optimized if some input filters don't contribute
to the output. When we switch blink SPv2 paint invalidation from using
blink's FilterOperations to cc/skia's filter classes, the non-
optimization caused over-raster-invalidations.

Now override SkImageFilter::onFilterBounds() in these classes to make
their filterBounds() return the same results as the blink counterparts.

Also fix a bug of SkArithmeticImageFilter when k4 is non-zero by
overriding affectsTransparentBlack() to return true in the case, so
that we will use the crop as the final bounds.

[1] https://cs.chromium.org/chromium/src/third_party/WebKit/Source/platform/graphics/filters/FEComposite.cpp?l=115

Change-Id: I91d4cadc267e6262ee3f050a0ddac90154419775
Reviewed-on: https://skia-review.googlesource.com/38921
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
2017-09-12 18:01:31 +00:00
animations first cut at a checkbox 2009-10-21 19:41:10 +00:00
bench Add a benchmark for SkXfermodeImageFilter mode kSrcIn 2017-09-11 16:43:50 +00:00
bin add a Win/Clang build bot 2017-07-31 19:53:51 +00:00
debugger Revert "Revert "Revert "Revert "Remove GrBackendRenderTargetDesc in favor of GrBackendRenderTarget."""" 2017-08-31 20:04:12 +00:00
dm Fix SkASSERT for convex paths with DAA 2017-09-07 14:30:01 +00:00
docs bookmaker spelling with fixed linux build 2017-09-01 20:10:51 +00:00
example More iOS Fixes for SkiaSDLExample. 2017-09-05 20:34:55 +00:00
experimental Fix SkSVGDOM length & presentation context scoping 2017-09-09 14:06:28 +00:00
fuzz Fuzz: use SkNullWStream 2017-08-29 17:41:36 +00:00
gm Remove symmetric three stop special case 2017-09-12 15:39:00 +00:00
gn Revert "Revert "Switch to the new SkSL lexer."" 2017-09-11 21:45:20 +00:00
include Revert "Remove isMipMapped from GrSurfaceDesc" and follow up find exact scratch CL 2017-09-08 19:58:18 +00:00
infra Simpler version of wait-for-device. 2017-09-12 17:25:30 +00:00
platform_tools Enable ios on Raspberry Pi 2017-04-25 16:56:41 +00:00
resources Move lang to list in Android font manager. 2017-08-14 19:29:05 +00:00
samplecode add L565 to our cycle of color configs in sampleapp 2017-09-06 19:33:08 +00:00
site Add links to autoroller cloud logs for roboCops 2017-09-07 15:30:51 +00:00
src Optimize filterBounds() of SkArithmeticImageFilter/SkXfermodeImageFilter 2017-09-12 18:01:31 +00:00
tests Optimize filterBounds() of SkArithmeticImageFilter/SkXfermodeImageFilter 2017-09-12 18:01:31 +00:00
third_party Fix system icu build. 2017-08-31 21:12:00 +00:00
tools Add support for additional textures in GrDrawOpAtlas 2017-09-12 17:16:00 +00:00
.clang-format Mark flatennable macros as block beginning/ending in .clang-format 2017-01-09 15:31:36 +00:00
.gitignore clang on windows support 2017-07-31 18:39:23 +00:00
.gn Basic standalone GN configs. 2016-07-21 12:25:45 -07:00
AUTHORS Added support for building for tvOS 2017-03-14 22:55:04 +00:00
BUILD.gn Revert "Revert "Switch to the new SkSL lexer."" 2017-09-11 21:45:20 +00:00
codereview.settings Make uploading to Gerrit the default for Skia 2016-11-09 19:07:56 +00:00
CONTRIBUTING Fix references to https://sites.google.com/site/skiadocs/. 2015-02-03 13:12:54 -02:00
CQ_COMMITTERS Moved committer list to chrome-infra-auth and deleted it from the repo 2015-09-02 13:37:54 -07:00
DEPS Roll skia/third_party/externals/angle2/ ef97c613f..06ef36b98 (2 commits) 2017-09-11 19:01:21 +00:00
Doxyfile Make the housekeeper upload doxygen to a newer bucket 2016-10-04 13:23:57 -07:00
LICENSE BUG=skia:5602 2016-09-02 11:19:34 -07:00
PRESUBMIT.py Update CQ extra trybots after switch to Debian 2017-06-29 19:35:40 +00:00
public.bzl Fix for Google3 roll failure 2017-09-07 15:29:01 +00:00
README Fix references to https://sites.google.com/site/skiadocs/. 2015-02-03 13:12:54 -02:00
README.chromium Update README.chromium. 2015-06-11 13:19:24 -07:00
whitespace.txt Revert "Whitespace change to test Android autoroller" 2017-09-07 15:25:02 +00:00

Skia is a complete 2D graphic library for drawing Text, Geometries, and Images.

See full details, and build instructions, at https://skia.org.