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

Unified Diff: include/core/SkColor.h

Issue 16410009: Add an option to create unpremultiplied bitmaps. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 6 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
Index: include/core/SkColor.h
diff --git a/include/core/SkColor.h b/include/core/SkColor.h
index dafc59676d2fd3ea50fa1c131d5a65db3fcba107..76bdfd4850a69bcd365580958fcfe666a34bd9fd 100644
--- a/include/core/SkColor.h
+++ b/include/core/SkColor.h
@@ -145,6 +145,14 @@ static inline SkColor SkHSVToColor(const SkScalar hsv[3])
*/
typedef uint32_t SkPMColor;
+/** Like SkPMColor, this is a 32 bit ARGB configuration dependent ordered color, but it is
reed1 2013/06/12 20:20:00 On conservative side, lets not make this public (y
+ nonpremultiplied, like SkColor.
+*/
+typedef SkPMColor SkUnPMColor;
+
+// Convert an unmultiplied color to a premultiplied color.
+SkPMColor SkPreMultiplyUnPMColor(SkUnPMColor c);
+
/** Return a SkPMColor value from unpremultiplied 8 bit component values
*/
SK_API SkPMColor SkPreMultiplyARGB(U8CPU a, U8CPU r, U8CPU g, U8CPU b);

Powered by Google App Engine
This is Rietveld 408576698