DescriptionImage filters: optimize crop rect application.
If a filter does not affect transparent black, there's no
reason to allow the crop rect to expand beyond the optimal
size determined by onFilterNodeBounds(). So don't enlarge
the bounds unless the filter affects transparent black.
In order to determine which filters affect transparent
black, I've pulled the inverse of the canComputeFastBounds()
logic into a non-recursive, affectsTransparentBlack()
virtual, and left canComputeFastBounds() as a non-virtual,
recursive function that calls it.
BUG=599933
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1848953002
TBR=reed@google.com
Committed: https://skia.googlesource.com/skia/+/6db0a7bdceb6be85721bfb0db8dea7fd27db5970
Patch Set 1 #Patch Set 2 : SkPaintImageFilter also affects transparent black #Patch Set 3 : Make canComputeFastBounds non-virtual #Patch Set 4 : Change applyTo() signature back. #Patch Set 5 : Fix typo #Patch Set 6 : Update to ToT #
Total comments: 8
Patch Set 7 : Fixes per review remarks #
Messages
Total messages: 26 (15 generated)
|