aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/images/SkBitmapRegionDecoder.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/images/SkBitmapRegionDecoder.h b/include/images/SkBitmapRegionDecoder.h
index 5b35371..c039c1b 100644
--- a/include/images/SkBitmapRegionDecoder.h
+++ b/include/images/SkBitmapRegionDecoder.h
@@ -4,16 +4,20 @@
#include "SkBitmap.h"
#include "SkRect.h"
#include "SkImageDecoder.h"
+#include "SkStream.h"
class SkBitmapRegionDecoder {
public:
- SkBitmapRegionDecoder(SkImageDecoder *decoder, int width, int height) {
+ SkBitmapRegionDecoder(SkImageDecoder *decoder, SkStream *stream,
+ int width, int height) {
fDecoder = decoder;
+ fStream = stream;
fWidth = width;
fHeight = height;
}
virtual ~SkBitmapRegionDecoder() {
delete fDecoder;
+ fStream->unref();
}
virtual bool decodeRegion(SkBitmap* bitmap, SkIRect rect,
@@ -26,6 +30,7 @@ public:
private:
SkImageDecoder *fDecoder;
+ SkStream *fStream;
int fWidth;
int fHeight;
};