diff options
author | Leon Scroggins III <scroggo@google.com> | 2017-08-22 14:13:15 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-08-22 19:36:48 +0000 |
commit | 223ec293ef3cd02bf2a2a8942d55e2490ee16d66 (patch) | |
tree | 4d94d60cc5f3bd30f62238d36db633b1b59d8b2b /src/codec/SkGifCodec.cpp | |
parent | 267641a90cb18a430b0a84910f651e2181744fd3 (diff) |
Make haveDecodedRow return void
The method already always returns true, except in a single case after
asserting.
Change-Id: Icf241a8af04220d459c0782ffd9b74c34c753236
Reviewed-on: https://skia-review.googlesource.com/37161
Reviewed-by: Chris Blume <cblume@chromium.org>
Commit-Queue: Leon Scroggins <scroggo@google.com>
Diffstat (limited to 'src/codec/SkGifCodec.cpp')
-rw-r--r-- | src/codec/SkGifCodec.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/codec/SkGifCodec.cpp b/src/codec/SkGifCodec.cpp index 9f9f8a633e..682b69f81e 100644 --- a/src/codec/SkGifCodec.cpp +++ b/src/codec/SkGifCodec.cpp @@ -421,7 +421,7 @@ void SkGifCodec::applyXformRow(const SkImageInfo& dstInfo, void* dst, const uint } } -bool SkGifCodec::haveDecodedRow(int frameIndex, const unsigned char* rowBegin, +void SkGifCodec::haveDecodedRow(int frameIndex, const unsigned char* rowBegin, int rowNumber, int repeatCount, bool writeTransparentPixels) { const SkGIFFrameContext* frameContext = fReader->frameContext(frameIndex); @@ -439,7 +439,7 @@ bool SkGifCodec::haveDecodedRow(int frameIndex, const unsigned char* rowBegin, // FIXME: No need to make the checks on width/xBegin/xEnd for every row. We could instead do // this once in prepareToDecode. if (!width || (xBegin < 0) || (yBegin < 0) || (xEnd <= xBegin) || (yEnd <= yBegin)) - return true; + return; // yBegin is the first row in the non-sampled image. dstRow will be the row in the output, // after potentially scaling it. @@ -456,7 +456,7 @@ bool SkGifCodec::haveDecodedRow(int frameIndex, const unsigned char* rowBegin, dstRow = potentialRow / sampleY; const int scaledHeight = get_scaled_dimension(this->dstInfo().height(), sampleY); if (dstRow >= scaledHeight) { - return true; + return; } foundNecessaryRow = true; @@ -474,7 +474,7 @@ bool SkGifCodec::haveDecodedRow(int frameIndex, const unsigned char* rowBegin, } if (!foundNecessaryRow) { - return true; + return; } } else { // Make sure the repeatCount does not take us beyond the end of the dst @@ -536,8 +536,7 @@ bool SkGifCodec::haveDecodedRow(int frameIndex, const unsigned char* rowBegin, break; default: SkASSERT(false); - return false; - break; + return; } p.append(SkRasterPipeline::srcover); p.append(storeDst, &dst); @@ -555,6 +554,4 @@ bool SkGifCodec::haveDecodedRow(int frameIndex, const unsigned char* rowBegin, memcpy(dst, copiedLine, bytesToCopy); } } - - return true; } |