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

Unified Diff: src/images/SkImageDecoder_libico.cpp

Issue 23477009: Change SkImageDecoders to take an SkStreamRewindable. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Only switch to SkStreamRewindable when necessary. Created 7 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/images/SkImageDecoder_libgif.cpp ('k') | src/images/SkImageDecoder_libjpeg.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/images/SkImageDecoder_libico.cpp
diff --git a/src/images/SkImageDecoder_libico.cpp b/src/images/SkImageDecoder_libico.cpp
index c0f0f91edfc5c60ebe6039bdf886bf3a84901c7d..2b65a36c76f3fe8bce69aac4a075495aa1271967 100644
--- a/src/images/SkImageDecoder_libico.cpp
+++ b/src/images/SkImageDecoder_libico.cpp
@@ -383,7 +383,7 @@ static void editPixelBit32(const int pixelNo, const unsigned char* buf,
DEFINE_DECODER_CREATOR(ICOImageDecoder);
/////////////////////////////////////////////////////////////////////////////////////////
-static bool is_ico(SkStream* stream) {
+static bool is_ico(SkStreamRewindable* stream) {
// Check to see if the first four bytes are 0,0,1,0
// FIXME: Is that required and sufficient?
SkAutoMalloc autoMal(4);
@@ -398,7 +398,7 @@ static bool is_ico(SkStream* stream) {
return true;
}
-static SkImageDecoder* sk_libico_dfactory(SkStream* stream) {
+static SkImageDecoder* sk_libico_dfactory(SkStreamRewindable* stream) {
if (is_ico(stream)) {
return SkNEW(SkICOImageDecoder);
}
@@ -407,7 +407,7 @@ static SkImageDecoder* sk_libico_dfactory(SkStream* stream) {
static SkImageDecoder_DecodeReg gReg(sk_libico_dfactory);
-static SkImageDecoder::Format get_format_ico(SkStream* stream) {
+static SkImageDecoder::Format get_format_ico(SkStreamRewindable* stream) {
if (is_ico(stream)) {
return SkImageDecoder::kICO_Format;
}
« no previous file with comments | « src/images/SkImageDecoder_libgif.cpp ('k') | src/images/SkImageDecoder_libjpeg.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698