| Index: src/images/SkImageDecoder_libbmp.cpp
|
| diff --git a/src/images/SkImageDecoder_libbmp.cpp b/src/images/SkImageDecoder_libbmp.cpp
|
| index 73e7a2014459417e713673e5ab64a55726153bbf..efe42b61beaa46751dc75dbdf0b04a966f236708 100644
|
| --- a/src/images/SkImageDecoder_libbmp.cpp
|
| +++ b/src/images/SkImageDecoder_libbmp.cpp
|
| @@ -25,7 +25,7 @@ public:
|
| }
|
|
|
| protected:
|
| - virtual bool onDecode(SkStream* stream, SkBitmap* bm, Mode mode) SK_OVERRIDE;
|
| + virtual bool onDecode(SkStreamRewindable* stream, SkBitmap* bm, Mode mode) SK_OVERRIDE;
|
|
|
| private:
|
| typedef SkImageDecoder INHERITED;
|
| @@ -35,7 +35,7 @@ private:
|
| DEFINE_DECODER_CREATOR(BMPImageDecoder);
|
| ///////////////////////////////////////////////////////////////////////////////
|
|
|
| -static bool is_bmp(SkStream* stream) {
|
| +static bool is_bmp(SkStreamRewindable* stream) {
|
| static const char kBmpMagic[] = { 'B', 'M' };
|
|
|
|
|
| @@ -45,23 +45,23 @@ static bool is_bmp(SkStream* stream) {
|
| !memcmp(buffer, kBmpMagic, sizeof(kBmpMagic));
|
| }
|
|
|
| -static SkImageDecoder* sk_libbmp_dfactory(SkStream* stream) {
|
| +static SkImageDecoder* sk_libbmp_dfactory(SkStreamRewindable* stream) {
|
| if (is_bmp(stream)) {
|
| return SkNEW(SkBMPImageDecoder);
|
| }
|
| return NULL;
|
| }
|
|
|
| -static SkTRegistry<SkImageDecoder*, SkStream*> gReg(sk_libbmp_dfactory);
|
| +static SkTRegistry<SkImageDecoder*, SkStreamRewindable*> gReg(sk_libbmp_dfactory);
|
|
|
| -static SkImageDecoder::Format get_format_bmp(SkStream* stream) {
|
| +static SkImageDecoder::Format get_format_bmp(SkStreamRewindable* stream) {
|
| if (is_bmp(stream)) {
|
| return SkImageDecoder::kBMP_Format;
|
| }
|
| return SkImageDecoder::kUnknown_Format;
|
| }
|
|
|
| -static SkTRegistry<SkImageDecoder::Format, SkStream*> gFormatReg(get_format_bmp);
|
| +static SkTRegistry<SkImageDecoder::Format, SkStreamRewindable*> gFormatReg(get_format_bmp);
|
|
|
| ///////////////////////////////////////////////////////////////////////////////
|
|
|
| @@ -93,7 +93,7 @@ private:
|
| bool fJustBounds;
|
| };
|
|
|
| -bool SkBMPImageDecoder::onDecode(SkStream* stream, SkBitmap* bm, Mode mode) {
|
| +bool SkBMPImageDecoder::onDecode(SkStreamRewindable* stream, SkBitmap* bm, Mode mode) {
|
| // First read the entire stream, so that all of the data can be passed to
|
| // the BmpDecoderHelper.
|
|
|
|
|