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

Unified Diff: src/codec/SkBmpCodec.cpp

Issue 1288483002: Consolidate SkCodec functions for handling rewind (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 4 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
Index: src/codec/SkBmpCodec.cpp
diff --git a/src/codec/SkBmpCodec.cpp b/src/codec/SkBmpCodec.cpp
index 4383382d8a60a729686be58c2e34f4705ebf8d83..5eb53544b5ce72e6542d755e6fd873693c85b642 100644
--- a/src/codec/SkBmpCodec.cpp
+++ b/src/codec/SkBmpCodec.cpp
@@ -533,19 +533,8 @@ SkBmpCodec::SkBmpCodec(const SkImageInfo& info, SkStream* stream,
, fRowOrder(rowOrder)
{}
-/*
- * Rewinds the image stream if necessary
- */
-bool SkBmpCodec::handleRewind(bool inIco) {
- SkCodec::RewindState rewindState = this->rewindIfNeeded();
- if (rewindState == kCouldNotRewind_RewindState) {
- return false;
- } else if (rewindState == kRewound_RewindState) {
- if (!SkBmpCodec::ReadHeader(this->stream(), inIco, NULL)) {
- return false;
- }
- }
- return true;
+bool SkBmpCodec::onRewind() {
+ return SkBmpCodec::ReadHeader(this->stream(), this->inIco(), NULL);
}
/*

Powered by Google App Engine
This is Rietveld 408576698