• Mike Reed's avatar
    Opt into new bicubic behavior · a2a7e93a
    Mike Reed authored
    Skia now supports explicit controls over the sampling technique:
    - filtering: nearest, linear, cubic (only works with mipmaps:none)
    - mipmaps: none, nearest, linear (allows trilerp)
    
    See SkSamplingOptions.h
    
    Switching to these means skia no longer "changes" the technique based on
    heuristics (like the direction of the scaling): you always get what you
    ask for (more predictable).
    
    Need to rebaseline tests, as sometimes (e.g.) Skia used to treat
    "High Qualitty" (ala bicubic) as just bilinear when downscaling.
    
    The SkFilterQuality enum is deprecated: it is mapped as follows:
    
    kNone.  : [ filter:nearest, mipmap:none    ]
    kLow    : [ filter:linear,  mipmap:none    ]
    kMedium : [ filter:linear,  mipmap:nearest ]
    kHigh   : [ filter:cubic,   mipmap:none    ]
    
    You can now specify these directly when you create an ImageShader.
    Specifying the enum in SkPaint is depcrecated, and will be removed.
    
    Bug: skia:7650
    Change-Id: I5251b195fbc8ff7e71d3aa76fdc3dde139a35c0c
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2562751
    Commit-Queue: Mike Reed <reed@google.com>
    Reviewed-by: default avatarFlorin Malita <fmalita@chromium.org>
    Reviewed-by: default avatarJonathan Backer <backer@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#832543}
    a2a7e93a
SVGFEImageElement-svgdom-preserveAspectRatio-prop-expected.png 51 KB
SVGFEImageElement-svgdom-preserveAspectRatio-prop-expected.png