• Michael Ludwig's avatar
    SkiaRenderer: implify how RPDQ mask images are applied using clipShader · 87db6a86
    Michael Ludwig authored
    DrawRPDQParams now just holds on to an SkShader that represents the mask image
    and the local matrix that needs to be applied to it. This removes a use of
    SkShaderMaskFilter that tried to combine the mask shader into the SkPaint of
    the draw. Instead, the mask is always applied by using SkCanvas::clipShader,
    which helps unify the code between a layer-needing RPDQ, an image RPDQ, and
    a solid color RPDQ. Having a mask image also no longer impacts whether or not
    a saveLayer() is needed because it is applied last (as desired), so
    skia_renderer no longer has to juggle the order that effect is applied in.
    
    Change-Id: I3d9ce085d498fabec42e112b0cb36e9707b96c8e
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2303672Reviewed-by: default avatarweiliangc <weiliangc@chromium.org>
    Commit-Queue: Michael Ludwig <michaelludwig@google.com>
    Cr-Commit-Position: refs/heads/master@{#789580}
    87db6a86
skia_renderer.cc 109 KB