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}