Index: src/images/SkImageDecoder_libico.cpp |
diff --git a/src/images/SkImageDecoder_libico.cpp b/src/images/SkImageDecoder_libico.cpp |
index 47fa7293f0a54b5410d8f361da4a23577d468479..78c9a095881b33ae98757721412a79fd87db90d6 100644 |
--- a/src/images/SkImageDecoder_libico.cpp |
+++ b/src/images/SkImageDecoder_libico.cpp |
@@ -20,7 +20,7 @@ public: |
} |
protected: |
- virtual bool onDecode(SkStream* stream, SkBitmap* bm, Mode) SK_OVERRIDE; |
+ virtual bool onDecode(SkStreamRewindable* stream, SkBitmap* bm, Mode) SK_OVERRIDE; |
private: |
typedef SkImageDecoder INHERITED; |
@@ -72,7 +72,7 @@ static int calculateRowBytesFor8888(int w, int bitCount) |
return 0; |
} |
-bool SkICOImageDecoder::onDecode(SkStream* stream, SkBitmap* bm, Mode mode) |
+bool SkICOImageDecoder::onDecode(SkStreamRewindable* stream, SkBitmap* bm, Mode mode) |
{ |
SkAutoMalloc autoMal; |
const size_t length = CopyStreamToStorage(&autoMal, stream); |
@@ -383,7 +383,7 @@ static void editPixelBit32(const int pixelNo, const unsigned char* buf, |
DEFINE_DECODER_CREATOR(ICOImageDecoder); |
///////////////////////////////////////////////////////////////////////////////////////// |
-static bool is_ico(SkStream* stream) { |
+static bool is_ico(SkStreamRewindable* stream) { |
// Check to see if the first four bytes are 0,0,1,0 |
// FIXME: Is that required and sufficient? |
SkAutoMalloc autoMal(4); |
@@ -400,20 +400,20 @@ static bool is_ico(SkStream* stream) { |
#include "SkTRegistry.h" |
-static SkImageDecoder* sk_libico_dfactory(SkStream* stream) { |
+static SkImageDecoder* sk_libico_dfactory(SkStreamRewindable* stream) { |
if (is_ico(stream)) { |
return SkNEW(SkICOImageDecoder); |
} |
return NULL; |
} |
-static SkTRegistry<SkImageDecoder*, SkStream*> gReg(sk_libico_dfactory); |
+static SkTRegistry<SkImageDecoder*, SkStreamRewindable*> gReg(sk_libico_dfactory); |
-static SkImageDecoder::Format get_format_ico(SkStream* stream) { |
+static SkImageDecoder::Format get_format_ico(SkStreamRewindable* stream) { |
if (is_ico(stream)) { |
return SkImageDecoder::kICO_Format; |
} |
return SkImageDecoder::kUnknown_Format; |
} |
-static SkTRegistry<SkImageDecoder::Format, SkStream*> gFormatReg(get_format_ico); |
+static SkTRegistry<SkImageDecoder::Format, SkStreamRewindable*> gFormatReg(get_format_ico); |