Index: src/codec/SkCodec_libgif.h |
diff --git a/src/codec/SkCodec_libgif.h b/src/codec/SkCodec_libgif.h |
index c29cbdb9d588acf27ee614bda1acd30fdd6693b2..6c7f3aabac99d46e1438dd8342f433c45d3041d9 100644 |
--- a/src/codec/SkCodec_libgif.h |
+++ b/src/codec/SkCodec_libgif.h |
@@ -85,12 +85,17 @@ private: |
/* |
* A gif may contain many image frames, all of different sizes. |
* This function checks if the frame dimensions are valid and corrects |
- * them if necessary. It then sets fFrameDims to the corrected |
- * dimensions. |
+ * them if necessary. |
scroggo
2015/10/06 12:57:37
Hmm, it seems like we correct size, rather than th
msarett
2015/10/06 14:39:17
Yes, will change this comment.
|
* |
- * @param desc The image frame descriptor |
+ * @param gif Pointer to the library type that manages the gif decode |
+ * @param size Size of the image that we will decode. |
+ * Will be set by this function if the return value is true. |
+ * @param frameRect Contains the dimenions and offset the first image frame. |
scroggo
2015/10/06 12:57:37
of* the first image frame
msarett
2015/10/06 14:39:17
Done.
|
+ * Will be set by this function if the return value is true. |
+ * |
+ * @return true on success, false otherwise |
*/ |
- bool setFrameDimensions(const GifImageDesc& desc); |
+ static bool SetDimensions(GifFileType* gif, SkISize* size, SkIRect* frameRect); |
reed1
2015/10/05 21:08:12
Seems like GetDimensions would be clearer.
msarett
2015/10/06 14:39:17
Done.
|
/* |
* Initializes the color table that we will use for decoding. |
@@ -164,14 +169,15 @@ private: |
* @param transIndex The transparent index. An invalid value |
* indicates that there is no transparent index. |
*/ |
- SkGifCodec(const SkImageInfo& srcInfo, SkStream* stream, GifFileType* gif, uint32_t transIndex); |
+ SkGifCodec(const SkImageInfo& srcInfo, SkStream* stream, GifFileType* gif, uint32_t transIndex, |
+ const SkIRect& frameRect, bool frameIsSubset); |
SkAutoTCallVProc<GifFileType, CloseGif> fGif; // owned |
SkAutoTDeleteArray<uint8_t> fSrcBuffer; |
- SkIRect fFrameDims; |
+ const SkIRect fFrameRect; |
const uint32_t fTransIndex; |
uint32_t fFillIndex; |
- bool fFrameIsSubset; |
+ const bool fFrameIsSubset; |
SkAutoTDelete<SkSwizzler> fSwizzler; |
SkAutoTUnref<SkColorTable> fColorTable; |