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

Unified Diff: include/images/SkImageDecoder.h

Issue 14363003: Updates to skimage tool to use it for testing. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: GetFormat -> GetStreamFormat Created 7 years, 8 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 | « gyp/images.gyp ('k') | include/images/SkImageEncoder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/images/SkImageDecoder.h
diff --git a/include/images/SkImageDecoder.h b/include/images/SkImageDecoder.h
index 38e77f4df765e7139f0f2507f57fbd4e0c00ae23..54176bd9b98261eb191cab19b63baec96c08172a 100644
--- a/include/images/SkImageDecoder.h
+++ b/include/images/SkImageDecoder.h
@@ -26,7 +26,6 @@ class SkImageDecoder {
public:
virtual ~SkImageDecoder();
- // Should be consistent with sFormatName
enum Format {
kUnknown_Format,
kBMP_Format,
@@ -37,7 +36,7 @@ public:
kWBMP_Format,
kWEBP_Format,
- kLastKnownFormat = kWEBP_Format
+ kLastKnownFormat = kWEBP_Format,
};
/** Return the format of image this decoder can decode. If this decoder can decode multiple
@@ -45,6 +44,11 @@ public:
*/
virtual Format getFormat() const;
+ /** Return the format of the SkStream or kUnknown_Format if it cannot be determined. Rewinds the
+ stream before returning.
+ */
+ static Format GetStreamFormat(SkStream*);
+
/** Return a readable string of the value returned by getFormat().
*/
const char* getFormatName() const;
@@ -416,13 +420,6 @@ private:
mutable bool fShouldCancelDecode;
bool fPreferQualityOverSpeed;
- /** Contains the image format name.
- * This should be consistent with Format.
- *
- * The format name gives a more meaningful error message than enum.
- */
- static const char* sFormatName[];
-
// illegal
SkImageDecoder(const SkImageDecoder&);
SkImageDecoder& operator=(const SkImageDecoder&);
« no previous file with comments | « gyp/images.gyp ('k') | include/images/SkImageEncoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698