| Index: src/core/SkColorSpaceXform.h
|
| diff --git a/src/core/SkColorSpaceXform.h b/src/core/SkColorSpaceXform.h
|
| index c80cd15dcae4f24e335a4e4d1e44f831cdb00a2e..6c996a9c09d30d51892a0dd79c705510ee6f3037 100644
|
| --- a/src/core/SkColorSpaceXform.h
|
| +++ b/src/core/SkColorSpaceXform.h
|
| @@ -25,20 +25,27 @@ public:
|
| static std::unique_ptr<SkColorSpaceXform> New(const sk_sp<SkColorSpace>& srcSpace,
|
| const sk_sp<SkColorSpace>& dstSpace);
|
|
|
| + enum ColorFormat : uint8_t {
|
| + kRGBA_8888_ColorFormat,
|
| + kBGRA_8888_ColorFormat,
|
| + kRGBA_F16_ColorFormat,
|
| + kRGBA_F32_ColorFormat,
|
| + };
|
| +
|
| /**
|
| * Apply the color conversion to a |src| buffer, storing the output in the |dst| buffer.
|
| *
|
| - * @param dst Stored in the format described by |dstColorType| and |dstAlphaType|
|
| - * @param src Stored as RGBA_8888, kUnpremul (note kOpaque is a form of kUnpremul)
|
| - * @param len Number of pixels in the buffers
|
| - * @param dstColorType Describes color type of |dst|
|
| - * @param dstAlphaType Describes alpha type of |dst|
|
| - * kUnpremul preserves input alpha values
|
| - * kPremul performs a premultiplication and also preserves alpha values
|
| - * kOpaque optimization hint, |dst| alphas set to 1
|
| + * @param dst Stored in the format described by |dstColorType| and |dstAlphaType|
|
| + * @param src Stored as RGBA_8888, kUnpremul (note kOpaque is a form of kUnpremul)
|
| + * @param len Number of pixels in the buffers
|
| + * @param dstColorFormat Describes color format of |dst|
|
| + * @param dstAlphaType Describes alpha type of |dst|
|
| + * kUnpremul preserves input alpha values
|
| + * kPremul performs a premultiplication and also preserves alpha values
|
| + * kOpaque optimization hint, |dst| alphas set to 1
|
| *
|
| */
|
| - virtual void apply(void* dst, const uint32_t* src, int len, SkColorType dstColorType,
|
| + virtual void apply(void* dst, const uint32_t* src, int len, ColorFormat dstColorFormat,
|
| SkAlphaType dstAlphaType) const = 0;
|
|
|
| virtual ~SkColorSpaceXform() {}
|
| @@ -66,7 +73,7 @@ template <SrcGamma kSrc, DstGamma kDst, ColorSpaceMatch kCSM>
|
| class SkColorSpaceXform_Base : public SkColorSpaceXform {
|
| public:
|
|
|
| - void apply(void* dst, const uint32_t* src, int len, SkColorType dstColorType,
|
| + void apply(void* dst, const uint32_t* src, int len, ColorFormat dstColorFormat,
|
| SkAlphaType dstAlphaType) const override;
|
|
|
| static constexpr int kDstGammaTableSize = 1024;
|
|
|