Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(717)

Unified Diff: src/images/SkMovie_gif.cpp

Issue 21053009: Upstream changes from Android (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/core/SkScalerContext.cpp ('k') | src/ports/SkFontConfigInterface_android.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/images/SkMovie_gif.cpp
diff --git a/src/images/SkMovie_gif.cpp b/src/images/SkMovie_gif.cpp
index 313bb2ce83b9973e913d497ec664f672abea7293..315816812a6238a0e4cd2db549b664eaa001f563 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)
« no previous file with comments | « src/core/SkScalerContext.cpp ('k') | src/ports/SkFontConfigInterface_android.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698