| Index: include/core/SkImageDecoder.h
|
| diff --git a/include/core/SkImageDecoder.h b/include/core/SkImageDecoder.h
|
| index 5ef569047b81087ccc728ef8c486d51e648593d5..d41d9880b102a91e5ef23f4e79e93113f00e02dd 100644
|
| --- a/include/core/SkImageDecoder.h
|
| +++ b/include/core/SkImageDecoder.h
|
| @@ -82,6 +82,19 @@ public:
|
| fPreferQualityOverSpeed = qualityOverSpeed;
|
| }
|
|
|
| + /** Set to true if the decoder should return a bitmap with unpremultiplied
|
| + colors. The decoder is free to ignore this request. The default is
|
| + false, meaning the resulting bitmap will have its colors premultiplied.
|
| + */
|
| + void setRequestUnpremultipliedColors(bool request) {
|
| + fRequestUnpremultipliedColors = request;
|
| + }
|
| +
|
| + /** Returns true if the decoder should try to return a bitmap with unpremultiplied
|
| + colors.
|
| + */
|
| + bool getRequestUnpremultipliedColors() const { return fRequestUnpremultipliedColors; }
|
| +
|
| /** \class Peeker
|
|
|
| Base class for optional callbacks to retrieve meta/chunk data out of
|
| @@ -433,6 +446,7 @@ private:
|
| bool fUsePrefTable;
|
| mutable bool fShouldCancelDecode;
|
| bool fPreferQualityOverSpeed;
|
| + bool fRequestUnpremultipliedColors;
|
| };
|
|
|
| /** Calling newDecoder with a stream returns a new matching imagedecoder
|
|
|