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

Unified Diff: tools/SkBitmapRegionDecoderInterface.h

Issue 1425833002: Add NewFromStream and getEncodedFormat to BitmapRegionDecoder (Closed) Base URL: https://skia.googlesource.com/skia.git@brd-design
Patch Set: Created 5 years, 2 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 | « tools/SkBitmapRegionCodec.h ('k') | tools/SkBitmapRegionDecoderInterface.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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; }
« no previous file with comments | « tools/SkBitmapRegionCodec.h ('k') | tools/SkBitmapRegionDecoderInterface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698