Chromium Code Reviews| Index: src/core/SkColorSpaceXform.h |
| diff --git a/src/core/SkColorSpaceXform.h b/src/core/SkColorSpaceXform.h |
| index 307cc709cd2d70f0dfd48a1c87448d1245113312..bb99071fe03388057c63e30327ca95bdb6ba23b5 100644 |
| --- a/src/core/SkColorSpaceXform.h |
| +++ b/src/core/SkColorSpaceXform.h |
| @@ -34,18 +34,20 @@ public: |
| /** |
| * 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 dst Stored in the format described by |dstColorFormat| |
| + * @param src Stored in the format described by |srcColorFormat| |
| * @param len Number of pixels in the buffers |
| * @param dstColorFormat Describes color format of |dst| |
| - * @param dstAlphaType Describes alpha type of |dst| |
| + * @param srcColorFormat Describes color format of |src| |
| + * Must be kRGBA_8888 or kBGRA_8888 |
| + * @param alphaType Describes alpha properties of the |dst| (and |src|) |
| * 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, ColorFormat dstColorFormat, |
|
msarett
2016/09/22 13:41:45
Might make this return a bool in a follow-up.
mtklein
2016/09/22 13:57:00
But which one?? true? false? so many choices.
msarett
2016/09/22 17:06:55
We currently assert(false) if:
(1) srcColorFormat
|
| - SkAlphaType dstAlphaType) const = 0; |
| + ColorFormat srcColorFormat, SkAlphaType alphaType) const = 0; |
| virtual ~SkColorSpaceXform() {} |
| }; |
| @@ -73,7 +75,7 @@ class SkColorSpaceXform_Base : public SkColorSpaceXform { |
| public: |
| void apply(void* dst, const uint32_t* src, int len, ColorFormat dstColorFormat, |
| - SkAlphaType dstAlphaType) const override; |
| + ColorFormat srcColorFormat, SkAlphaType alphaType) const override; |
| static constexpr int kDstGammaTableSize = 1024; |