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

Unified Diff: src/codec/SkBmpCodec.h

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
« no previous file with comments | « include/codec/SkCodec.h ('k') | src/codec/SkBmpCodec.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codec/SkBmpCodec.h
diff --git a/src/codec/SkBmpCodec.h b/src/codec/SkBmpCodec.h
index 51d03000919977549919543605daeba40d713e5e..71006f73153ea3028529b0c51daa999b498bc86e 100644
--- a/src/codec/SkBmpCodec.h
+++ b/src/codec/SkBmpCodec.h
@@ -63,10 +63,18 @@ protected:
*/
static bool ReadHeader(SkStream*, bool inIco, SkCodec** codecOut);
+ bool onRewind() override;
+
/*
- * Rewinds the image stream if necessary
+ * Returns whether this BMP is part of an ICO image.
*/
- bool handleRewind(bool inIco);
+ bool inIco() const {
scroggo_chromium 2015/08/11 16:29:42 This split follows the convention we follow for pu
msarett 2015/08/12 13:38:46 I don't feel strongly on this. Looks fine to me.
+ return this->onInIco();
+ }
+
+ virtual bool onInIco() const {
+ return false;
+ }
/*
* Get the destination row to start filling from
« no previous file with comments | « include/codec/SkCodec.h ('k') | src/codec/SkBmpCodec.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698