skia2/src/images
Leon Scroggins III 194580dc60 Reland "Treat kWEBP encode with quality=100 as lossless"
This reverts commit 22170b3178.

It was reverted due to the test breaking Google3. This includes a
workaround.

    Original change's description:
    > Treat kWEBP encode with quality=100 as lossless
    >
    > In SkEncodeImage and friends, treat quality of 100 as a lossless encode
    > when using kWEBP. This seems a good fit for the intent - which is
    > presumably to save the highest quality image. This also matches
    > Chromium's blink::ImageEncoder::ComputeWebpOptions, which treats a
    > quality of 1 (on a float scale from 0 to 1) as a lossless encode.
    >
    > FWIW, Chromium has had this behavior since
    > https://codereview.chromium.org/1937433002, in response to
    > crbug.com/523098. The goal is to "maintain sharpness to
    > match the JPEG encoder behavior (use WEBP lossless encoding)".
    >
    > Add a test to verify the new behavior. This requires making tests
    > depend on libwebp to use WebPGetFeatures, since the Skia API does not
    > provide a way to determine whether an encoded webp file was encoded
    > lossless-ly or lossily.
    >
    > Bug: skia:8586
    > Change-Id: Ie9e09c2f7414ab701d696c4ad9edf405868a716f
    > Reviewed-on: https://skia-review.googlesource.com/c/175823
    > Commit-Queue: Leon Scroggins <scroggo@google.com>
    > Reviewed-by: Derek Sollenberger <djsollen@google.com>
    > Reviewed-by: Mike Reed <reed@google.com>

TBR=reed@google.com, based on prior approval

Bug: skia:8586
Change-Id: I09c73f71996422f797fd9456fef5dfad9af36839
Reviewed-on: https://skia-review.googlesource.com/c/194194
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
Auto-Submit: Leon Scroggins <scroggo@google.com>
2019-02-25 18:42:22 +00:00
..
SkImageEncoder.cpp Reland "Treat kWEBP encode with quality=100 as lossless" 2019-02-25 18:42:22 +00:00
SkImageEncoderFns.h Remove nearly all use of SkColorSpaceTransferFn 2019-01-24 17:45:19 +00:00
SkImageEncoderPriv.h Remove color space restrictions from image infos 2018-06-04 14:07:48 +00:00
SkJpegEncoder.cpp DeMorgan's blend-on-black logic 2018-11-02 19:28:57 +00:00
SkJPEGWriteUtility.cpp return proper false for jpeg 2019-01-07 15:06:36 +00:00
SkJPEGWriteUtility.h Add SK_API to APIs used by the android framework. 2017-09-21 18:14:36 +00:00
SkPngEncoder.cpp implement most SkImageEncoderFns with skcms 2018-11-02 18:35:40 +00:00
SkWebpEncoder.cpp remove unused SkImageEncoderFns bits 2018-11-02 17:04:56 +00:00