diff options
author | Matt Sarett <msarett@google.com> | 2017-04-11 09:51:32 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-04-11 14:27:28 +0000 |
commit | 68feef423dfa1f3e2e6e9b0f4df1027f6e8645b1 (patch) | |
tree | 39da66c24218258f5b8abb1c64a7a236ab1529e4 /include/codec | |
parent | 3fbca26e9c0e6e3c27c9dd437c9f790a31f20675 (diff) |
Allow BF and BRD clients to request an output color space
Bug: skia:
Change-Id: I0f0d3bfdd5c47544ab71167fd7984ee8e8ac5903
Reviewed-on: https://skia-review.googlesource.com/11601
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Diffstat (limited to 'include/codec')
-rw-r--r-- | include/codec/SkAndroidCodec.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/include/codec/SkAndroidCodec.h b/include/codec/SkAndroidCodec.h index 8e9ad4e2d3..87d514dfff 100644 --- a/include/codec/SkAndroidCodec.h +++ b/include/codec/SkAndroidCodec.h @@ -76,11 +76,17 @@ public: SkAlphaType computeOutputAlphaType(bool requestedUnpremul); /** - * @param outputColorType Color type that the client will decode to + * @param outputColorType Color type that the client will decode to. + * @param prefColorSpace Preferred color space to decode to. + * This may not return |prefColorSpace| for a couple reasons. + * (1) Android Principles: 565 must be sRGB, F16 must be + * linear sRGB, transfer function must be parametric. + * (2) Codec Limitations: F16 requires a linear color space. * * Returns the appropriate color space to decode to. */ - sk_sp<SkColorSpace> computeOutputColorSpace(SkColorType outputColorType); + sk_sp<SkColorSpace> computeOutputColorSpace(SkColorType outputColorType, + sk_sp<SkColorSpace> prefColorSpace = nullptr); /** * Returns the dimensions of the scaled output image, for an input |