Chromium Code Reviews| Index: src/codec/SkCodec_libgif.cpp |
| diff --git a/src/codec/SkCodec_libgif.cpp b/src/codec/SkCodec_libgif.cpp |
| index 018789155879f6ee7c38a7140567bbc5a112516a..21fc95aa5cb4c588bc02838e94d31f1a9b992790 100644 |
| --- a/src/codec/SkCodec_libgif.cpp |
| +++ b/src/codec/SkCodec_libgif.cpp |
| @@ -30,13 +30,6 @@ bool SkGifCodec::IsGif(SkStream* stream) { |
| } |
| /* |
| - * Warning reporting function |
| - */ |
| -static void gif_warning(const char* msg) { |
| - SkCodecPrintf("Gif Warning: %s\n", msg); |
| -} |
| - |
| -/* |
| * Error function |
| */ |
| static SkCodec::Result gif_error(const char* msg, SkCodec::Result result = SkCodec::kInvalidInput) { |
| @@ -237,6 +230,7 @@ SkGifCodec::SkGifCodec(const SkImageInfo& srcInfo, SkStream* stream, GifFileType |
| : INHERITED(srcInfo, stream) |
| , fGif(gif) |
| , fSrcBuffer(new uint8_t[this->getInfo().width()]) |
| + , fFrameRect(frameRect) |
| // If it is valid, fTransIndex will be used to set fFillIndex. We don't know if |
| // fTransIndex is valid until we process the color table, since fTransIndex may |
| // be greater than the size of the color table. |
| @@ -244,10 +238,9 @@ SkGifCodec::SkGifCodec(const SkImageInfo& srcInfo, SkStream* stream, GifFileType |
| // Default fFillIndex is 0. We will overwrite this if fTransIndex is valid, or if |
| // there is a valid background color. |
| , fFillIndex(0) |
| - , fFrameRect(frameRect) |
| , fFrameIsSubset(frameIsSubset) |
| - , fColorTable(NULL) |
| , fSwizzler(NULL) |
| + , fColorTable(NULL) |
| {} |
| bool SkGifCodec::onRewind() { |
| @@ -367,6 +360,8 @@ bool SkGifCodec::GetDimensions(GifFileType* gif, SkISize* size, SkIRect* frameRe |
| // in fact positive. |
| if (frameLeft < 0 || frameTop < 0 || frameWidth < 0 || frameHeight < 0 || width <= 0 || |
| height <= 0) { |
| + size->set(0, 0); |
|
scroggo
2015/10/15 12:49:53
I take it this fixes a warning that we read these
msarett
2015/10/15 13:06:40
Acknowledged.
|
| + frameRect->setXYWH(0, 0, 0, 0); |
| return false; |
| } |