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

Unified Diff: src/images/SkImageDecoder_FactoryRegistrar.cpp

Issue 1018953003: Add SkEncodedFormat, used by SkCodec. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Use a common enum for SkImageEncoder and SkImageDecoder and SkCodec Created 5 years, 9 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/images/SkImageDecoder_FactoryRegistrar.cpp
diff --git a/src/images/SkImageDecoder_FactoryRegistrar.cpp b/src/images/SkImageDecoder_FactoryRegistrar.cpp
index b47a6d5317dca15c71d83edcfe367363f9c4bdef..66eb0b141af280284d51919589dd03dbafc645b0 100644
--- a/src/images/SkImageDecoder_FactoryRegistrar.cpp
+++ b/src/images/SkImageDecoder_FactoryRegistrar.cpp
@@ -45,19 +45,19 @@ SkImageDecoder* image_decoder_from_stream(SkStreamRewindable* stream) {
template SkImageDecoder_FormatReg* SkImageDecoder_FormatReg::gHead;
-SkImageDecoder::Format SkImageDecoder::GetStreamFormat(SkStreamRewindable* stream) {
+SkEncodedFormat SkImageDecoder::GetStreamFormat(SkStreamRewindable* stream) {
const SkImageDecoder_FormatReg* curr = SkImageDecoder_FormatReg::Head();
while (curr != NULL) {
- Format format = curr->factory()(stream);
+ SkEncodedFormat format = curr->factory()(stream);
if (!stream->rewind()) {
SkErrorInternals::SetError(kInvalidOperation_SkError,
"Unable to rewind the image stream\n");
- return kUnknown_Format;
+ return kUnknown_SkEncodedFormat;
}
- if (format != kUnknown_Format) {
+ if (format != kUnknown_SkEncodedFormat) {
return format;
}
curr = curr->next();
}
- return kUnknown_Format;
+ return kUnknown_SkEncodedFormat;
}

Powered by Google App Engine
This is Rietveld 408576698