From 68feef423dfa1f3e2e6e9b0f4df1027f6e8645b1 Mon Sep 17 00:00:00 2001 From: Matt Sarett Date: Tue, 11 Apr 2017 09:51:32 -0400 Subject: 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 Reviewed-by: Mike Reed Reviewed-by: Leon Scroggins --- include/codec/SkAndroidCodec.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'include/codec') 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 computeOutputColorSpace(SkColorType outputColorType); + sk_sp computeOutputColorSpace(SkColorType outputColorType, + sk_sp prefColorSpace = nullptr); /** * Returns the dimensions of the scaled output image, for an input -- cgit v1.2.3