Index: tools/SkBitmapRegionDecoderInterface.h |
diff --git a/tools/SkBitmapRegionDecoderInterface.h b/tools/SkBitmapRegionDecoderInterface.h |
index a6a31114578e7c70c86ce2f70dfe635cb6808d62..8e19e95a0a9867557dce940725d6b714e46627e8 100644 |
--- a/tools/SkBitmapRegionDecoderInterface.h |
+++ b/tools/SkBitmapRegionDecoderInterface.h |
@@ -9,6 +9,7 @@ |
#define SkBitmapRegionDecoder_DEFINED |
#include "SkBitmap.h" |
+#include "SkEncodedFormat.h" |
#include "SkStream.h" |
/* |
@@ -33,6 +34,14 @@ public: |
SkData* data, Strategy strategy); |
/* |
+ * @param stream Takes ownership of the stream |
+ * @param strategy Strategy used for scaling and subsetting |
+ * @return Tries to create an SkBitmapRegionDecoder, returns NULL on failure |
+ */ |
+ static SkBitmapRegionDecoderInterface* CreateBitmapRegionDecoder( |
+ SkStreamRewindable* stream, Strategy strategy); |
+ |
+ /* |
* Decode a scaled region of the encoded image stream |
* |
* @param bitmap Container for decoded pixels. It is assumed that the pixels |
@@ -59,6 +68,8 @@ public: |
*/ |
virtual bool conversionSupported(SkColorType colorType) = 0; |
+ virtual SkEncodedFormat getEncodedFormat() = 0; |
+ |
int width() const { return fWidth; } |
int height() const { return fHeight; } |