diff options
Diffstat (limited to 'src/images/SkMovie_gif.cpp')
-rw-r--r-- | src/images/SkMovie_gif.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/images/SkMovie_gif.cpp b/src/images/SkMovie_gif.cpp index 313bb2ce83..315816812a 100644 --- a/src/images/SkMovie_gif.cpp +++ b/src/images/SkMovie_gif.cpp @@ -123,6 +123,7 @@ static void copyLine(uint32_t* dst, const unsigned char* src, const ColorMapObje } } +#if GIFLIB_MAJOR < 5 static void copyInterlaceGroup(SkBitmap* bm, const unsigned char*& src, const ColorMapObject* cmap, int transparent, int copyWidth, int copyHeight, const GifImageDesc& imageDesc, int rowStep, @@ -169,6 +170,7 @@ static void blitInterlace(SkBitmap* bm, const SavedImage* frame, const ColorMapO copyInterlaceGroup(bm, src, cmap, transparent, copyWidth, copyHeight, frame->ImageDesc, 2, 1); } +#endif static void blitNormal(SkBitmap* bm, const SavedImage* frame, const ColorMapObject* cmap, int transparent) @@ -241,11 +243,15 @@ static void drawFrame(SkBitmap* bm, const SavedImage* frame, const ColorMapObjec return; } +#if GIFLIB_MAJOR < 5 + // before GIFLIB 5, de-interlacing wasn't done by library at load time if (frame->ImageDesc.Interlace) { blitInterlace(bm, frame, cmap, transparent); - } else { - blitNormal(bm, frame, cmap, transparent); + return; } +#endif + + blitNormal(bm, frame, cmap, transparent); } static bool checkIfWillBeCleared(const SavedImage* frame) |