Chromium Code Reviews
DescriptionImplement correct clipping for image filters.
Image filters in Skia currently clip the size of the the offscreen
bitmap used for filtering to the device clip bounds. This means that
any pixel-moving filter (e.g., blur) has edge artifacts at the clip
boundaries. This is problematic for tiling, where a single SkPicture
is played back with a clip set to the tile boundaries.
By implementing the onFilterBounds() traversal, and using it in
saveLayer() when a filter is present, we can clip the layer to the
expanded clip rect. Note that this requires that the traversal be
performed in reverse as compared to computeFastBounds(). (It's also
done in device space, unlike computeFastBounds()).
New test imagefiltersclipped tests pixel-moving filters when clipped
by various clip rects.
New test imageblurtiled tests tiled (compositor-style) rendering of
blurred text. There should be no artifacts at the tile boundaries.
BUG=337831
R=reed@google.com
Committed: https://code.google.com/p/skia/source/detail?r=13323
Patch Set 1 #Patch Set 2 : Add filterBounds() support for all primitives which were computing fast bounds. #Patch Set 3 : Add filterBounds() support for SkColorFilterImageFilter. #Patch Set 4 : Updated to ToT #Patch Set 5 : Updated to ToT; provided base class SkImageFilter::onFilterBounds() #Patch Set 6 : implement onFilterBounds() for all filters; move its application to SkCanvas::clipRectBounds(); add… #Patch Set 7 : Copyright hygiene #Patch Set 8 : Cleanup #
Total comments: 8
Patch Set 9 : Changes re: review comments #Patch Set 10 : Win build fixes; round -> ceil (pessimism) fixes #Patch Set 11 : Add morphology to the list of ignored tests #
Messages
Total messages: 10 (0 generated)
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||