Index: src/codec/SkCodecPriv.h |
diff --git a/src/codec/SkCodecPriv.h b/src/codec/SkCodecPriv.h |
index 17494074b31306eadea1bf7d17c49e7b104277ff..9a8a43e8352a7d9a783ba9a6a343bf278266eb8a 100644 |
--- a/src/codec/SkCodecPriv.h |
+++ b/src/codec/SkCodecPriv.h |
@@ -331,4 +331,8 @@ static inline bool needs_color_xform(const SkImageInfo& dstInfo, const SkImageIn |
return !isLegacy && (needsPremul || isF16 || srcDstNotEqual); |
} |
+static inline SkAlphaType select_alpha_xform(SkAlphaType dstAlphaType, SkAlphaType srcAlphaType) { |
+ return (kOpaque_SkAlphaType == srcAlphaType) ? kOpaque_SkAlphaType : dstAlphaType; |
+} |
+ |
#endif // SkCodecPriv_DEFINED |