Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(113)

Unified Diff: src/core/SkColorSpaceXform.h

Issue 2353363008: Add BGRA as input format to SkColorSpaceXform (Closed)
Patch Set: Response to comments Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/codec/SkWebpCodec.cpp ('k') | src/core/SkColorSpaceXform.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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,
- 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;
« no previous file with comments | « src/codec/SkWebpCodec.cpp ('k') | src/core/SkColorSpaceXform.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698