Index: include/codec/SkAndroidCodec.h |
diff --git a/include/codec/SkAndroidCodec.h b/include/codec/SkAndroidCodec.h |
index f979886a43ec33c573de3553b49651a8a06d7025..9e12afb3607240dfcb2c51fc25b680277e1379a6 100644 |
--- a/include/codec/SkAndroidCodec.h |
+++ b/include/codec/SkAndroidCodec.h |
@@ -42,6 +42,28 @@ public: |
*/ |
static SkAndroidCodec* NewFromData(SkData*, SkPngChunkReader* = NULL); |
+ /** |
+ * @param requestedColorType Color type requested by the client |
+ * @param suggestedColorType Color type suggested by SkAndroidCodec |
+ * @param suggestedAlphaType Alpha type suggested by SkAndroidCodec |
+ * |
+ * @return If it is possible to decode to requestedColorType, this returns |
+ * requestedColorType. Otherwise, this returns kN32_SkColorType. |
+ */ |
+ static SkColorType FixRequestedColorType(SkColorType requestedColorType, |
+ SkColorType suggestedColorType, SkAlphaType suggestedAlphaType); |
+ |
+ /** |
+ * @param requestedUnpremul Indicates if the client requested |
+ * unpremultiplied output |
+ * @param suggestedAlphaType Alpha type suggested by SkAndroidCodec |
+ * |
+ * @return Returns the appropriate alpha type to decode to. If the image |
+ * has alpha, the value of requestedUnpremul will be honored. |
+ */ |
+ static SkAlphaType FixRequestedAlphaType(bool requestedUnpremul, |
+ SkAlphaType suggestedAlphaType); |
+ |
virtual ~SkAndroidCodec() {} |