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

Unified Diff: src/images/SkMovie_gif.cpp

Issue 23477009: Change SkImageDecoders to take an SkStreamRewindable. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Remove accidental whitespace change Created 7 years, 4 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
Index: src/images/SkMovie_gif.cpp
diff --git a/src/images/SkMovie_gif.cpp b/src/images/SkMovie_gif.cpp
index 315816812a6238a0e4cd2db549b664eaa001f563..441626bf64c6654b6926d7e86bfc9820a1de1ab1 100644
--- a/src/images/SkMovie_gif.cpp
+++ b/src/images/SkMovie_gif.cpp
@@ -18,7 +18,7 @@
class SkGIFMovie : public SkMovie {
public:
- SkGIFMovie(SkStream* stream);
+ SkGIFMovie(SkStreamRewindable* stream);
virtual ~SkGIFMovie();
protected:
@@ -34,11 +34,11 @@ private:
};
static int Decode(GifFileType* fileType, GifByteType* out, int size) {
- SkStream* stream = (SkStream*) fileType->UserData;
+ SkStreamRewindable* stream = (SkStreamRewindable*) fileType->UserData;
return (int) stream->read(out, size);
}
-SkGIFMovie::SkGIFMovie(SkStream* stream)
+SkGIFMovie::SkGIFMovie(SkStreamRewindable* stream)
{
#if GIFLIB_MAJOR < 5
fGIF = DGifOpen( stream, Decode );
@@ -432,7 +432,7 @@ bool SkGIFMovie::onGetBitmap(SkBitmap* bm)
#include "SkTRegistry.h"
-SkMovie* Factory(SkStream* stream) {
+SkMovie* Factory(SkStreamRewindable* stream) {
char buf[GIF_STAMP_LEN];
if (stream->read(buf, GIF_STAMP_LEN) == GIF_STAMP_LEN) {
if (memcmp(GIF_STAMP, buf, GIF_STAMP_LEN) == 0 ||
@@ -446,4 +446,4 @@ SkMovie* Factory(SkStream* stream) {
return NULL;
}
-static SkTRegistry<SkMovie*, SkStream*> gReg(Factory);
+static SkTRegistry<SkMovie*, SkStreamRewindable*> gReg(Factory);

Powered by Google App Engine
This is Rietveld 408576698