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

Unified Diff: src/codec/SkCodecPriv.h

Issue 2294993002: Add color xform support to SkWebpCodec (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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
Index: src/codec/SkCodecPriv.h
diff --git a/src/codec/SkCodecPriv.h b/src/codec/SkCodecPriv.h
index 17494074b31306eadea1bf7d17c49e7b104277ff..6edb7514a2e995181beb6ef58a7ec7273c65f4fe 100644
--- a/src/codec/SkCodecPriv.h
+++ b/src/codec/SkCodecPriv.h
@@ -331,4 +331,9 @@ static inline bool needs_color_xform(const SkImageInfo& dstInfo, const SkImageIn
return !isLegacy && (needsPremul || isF16 || srcDstNotEqual);
}
+static inline SkAlphaType color_xform_alpha_type(SkAlphaType dstAlphaType, SkAlphaType srcAlphaType)
scroggo 2016/09/07 20:32:58 This name seems extra specific, and yet it doesn't
msarett 2016/09/07 22:27:41 Going with "select_alpha_xform".
+{
+ return (kOpaque_SkAlphaType == srcAlphaType) ? kOpaque_SkAlphaType : dstAlphaType;
+}
+
#endif // SkCodecPriv_DEFINED

Powered by Google App Engine
This is Rietveld 408576698