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

Unified Diff: src/codec/SkCodec_libpng.cpp

Issue 1381483002: Call rewindIfNeeded in SkCodec (Closed) Base URL: https://skia.googlesource.com/skia.git@codecSDmerge
Patch Set: Rebase Created 5 years, 3 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/SkCodec_libgif.cpp ('k') | src/codec/SkCodec_wbmp.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codec/SkCodec_libpng.cpp
diff --git a/src/codec/SkCodec_libpng.cpp b/src/codec/SkCodec_libpng.cpp
index faba79f6a2faffcc9fe87c50862df599be940594..1af8658e1ea0d87cb4c0dff5bcf8b10ac649c475 100644
--- a/src/codec/SkCodec_libpng.cpp
+++ b/src/codec/SkCodec_libpng.cpp
@@ -477,9 +477,6 @@ SkCodec::Result SkPngCodec::onGetPixels(const SkImageInfo& requestedInfo, void*
if (requestedInfo.dimensions() != this->getInfo().dimensions()) {
return kInvalidScale;
}
- if (!this->rewindIfNeeded()) {
- return kCouldNotRewind;
- }
// Note that ctable and ctableCount may be modified if there is a color table
const Result result = this->initializeSwizzler(requestedInfo, options,
@@ -592,10 +589,6 @@ public:
Result onStartScanlineDecode(const SkImageInfo& dstInfo, const Options& options,
SkPMColor ctable[], int* ctableCount) override {
- if (!this->rewindIfNeeded()) {
- return kCouldNotRewind;
- }
-
if (!conversion_possible(dstInfo, this->getInfo())) {
return kInvalidConversion;
}
@@ -690,10 +683,6 @@ public:
Result onStartScanlineDecode(const SkImageInfo& dstInfo, const Options& options,
SkPMColor ctable[], int* ctableCount) override
{
- if (!this->rewindIfNeeded()) {
- return kCouldNotRewind;
- }
-
if (!conversion_possible(dstInfo, this->getInfo())) {
return kInvalidConversion;
}
« no previous file with comments | « src/codec/SkCodec_libgif.cpp ('k') | src/codec/SkCodec_wbmp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698