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

Unified Diff: src/codec/SkCodec_libgif.cpp

Issue 1400343005: Reenable warnings in src/codec (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Response to comments Created 5 years, 2 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/SkBmpStandardCodec.cpp ('k') | src/codec/SkCodec_libpng.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codec/SkCodec_libgif.cpp
diff --git a/src/codec/SkCodec_libgif.cpp b/src/codec/SkCodec_libgif.cpp
index 018789155879f6ee7c38a7140567bbc5a112516a..03107aba2ee80d824676b8e92f8f80720575ba6f 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) {
@@ -189,6 +182,7 @@ bool SkGifCodec::ReadHeader(SkStream* stream, SkCodec** codecOut, GifFileType**
SkIRect frameRect;
if (!GetDimensions(gif, &size, &frameRect)) {
gif_error("Invalid gif size.\n");
+ return false;
}
bool frameIsSubset = (size != frameRect.size());
@@ -237,6 +231,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 +239,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() {
« no previous file with comments | « src/codec/SkBmpStandardCodec.cpp ('k') | src/codec/SkCodec_libpng.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698