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

Unified Diff: src/codec/SkCodec_libgif.h

Issue 1055743003: Swizzler changes Index8 and 565 (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix windows errors Created 5 years, 8 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/codec/SkCodec_libbmp.cpp ('k') | src/codec/SkCodec_libgif.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codec/SkCodec_libgif.h
diff --git a/src/codec/SkCodec_libgif.h b/src/codec/SkCodec_libgif.h
index de59c6c32a4d1f511a14571c8f3213d60294e935..d805accac3a9399bca1ae88dc254cd19dcbe517a 100644
--- a/src/codec/SkCodec_libgif.h
+++ b/src/codec/SkCodec_libgif.h
@@ -34,6 +34,27 @@ public:
protected:
/*
+ * Read enough of the stream to initialize the SkGifCodec.
+ * Returns a bool representing success or failure.
+ *
+ * @param codecOut
+ * If it returned true, and codecOut was not NULL,
+ * codecOut will be set to a new SkGifCodec.
+ *
+ * @param gifOut
+ * If it returned true, and codecOut was NULL,
+ * gifOut must be non-NULL and gifOut will be set to a new
+ * GifFileType pointer.
+ *
+ * @param stream
+ * Deleted on failure.
+ * codecOut will take ownership of it in the case where we created a codec.
+ * Ownership is unchanged when we returned a gifOut.
+ *
+ */
+ static bool ReadHeader(SkStream* stream, SkCodec** codecOut, GifFileType** gifOut);
+
+ /*
* Initiates the gif decode
*/
Result onGetPixels(const SkImageInfo&, void*, size_t, const Options&,
@@ -49,7 +70,7 @@ private:
* This function cleans up the gif object after the decode completes
* It is used in a SkAutoTCallIProc template
*/
- static int32_t CloseGif(GifFileType* gif);
+ static void CloseGif(GifFileType* gif);
/*
* Frees any extension data used in the decode
@@ -68,7 +89,7 @@ private:
*/
SkGifCodec(const SkImageInfo& srcInfo, SkStream* stream, GifFileType* gif);
- SkAutoTCallIProc<GifFileType, CloseGif> fGif; // owned
+ SkAutoTCallVProc<GifFileType, CloseGif> fGif; // owned
typedef SkCodec INHERITED;
};
« no previous file with comments | « src/codec/SkCodec_libbmp.cpp ('k') | src/codec/SkCodec_libgif.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698