Reland "[skif] Remove dedicated SkDropShadowImageFilter implementation"
This reverts commit adbe9aa7d720430e08da25b1357521b45b4e3027.
Reason for revert: the original CL was reverted for staging into
chrome and G3, and some weird sampling artifacts on several devices.
G3 and chrome both have staging flags in their builds. The artifacts
were due to nearest-neighbor sampling where the drawn rectangle was
exactly at a half-pixel offset. On some platforms, this led to
unstable sampling patterns (random streaks -> JioNext, rounding that
differed between the two rect triangles highlighting the diagonal
-> QuadroP400 and others, or vertical/horizontal clamps -> M1).
This CL is updated to use a translate matrix transform with bilinear
filtering (::Offset doesn't take a SamplingOptions yet, but is
otherwise identical to a translate matrix transform). ImageFilterTests
are updated to account for the MatrixTransformImageFilter requesting
an extra 1px buffer for bilinear sampling.
Original change's description:
> Revert "[skif] Remove dedicated SkDropShadowImageFilter implementation"
>
> This reverts commit d448fe07ea4610a28947b120305ed8b8a6a59504.
>
> Reason for revert: strange clipping and sampling artifacts on some GPUs
>
> Original change's description:
> > [skif] Remove dedicated SkDropShadowImageFilter implementation
> >
> > Offsets and color filters now use FilterResult to compose together
> > without producing intermediate renderpasses. This means that the
> > image filter sub graph that describes a drop shadow should have an
> > equivalent number of renderpasses as this dedicated image (which
> > internally applied an offset during drawing, a color filter and
> > recursed with a blur image filter).
> >
> > Besides functions for creating the graph of image filters, the
> > majority of this CL is adjusting the SKP deserialization so that
> > SKPs that referenced the old SkDropShadowImageFilter CreateProc can
> > be reconstructed until the min picture version has moved past.
> >
> > Bug: skia:9283
> > Bug: b/263133333
> > Change-Id: I75ae0772c254d0633b8ca4621d63a48ed683470f
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/688136
> > Commit-Queue: Michael Ludwig <michaelludwig@google.com>
> > Reviewed-by: Brian Osman <brianosman@google.com>
>
> Bug: skia:9283
> Bug: b/263133333
> Change-Id: I2e4211aaf3ec769644a0a1b465aa3f46b368455b
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/701996
> Auto-Submit: Michael Ludwig <michaelludwig@google.com>
> Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bug: skia:9283
Bug: b/263133333
Change-Id: Id144ddeed0d85eca3a442137435cd744e022c62f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/708961
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
7 files changed