aboutsummaryrefslogtreecommitdiffstats
path: root/include/images/SkImageRef.h
diff options
context:
space:
mode:
authorThe Android Open Source Project <initial-contribution@android.com>2009-03-18 17:39:44 -0700
committerThe Android Open Source Project <initial-contribution@android.com>2009-03-18 17:39:44 -0700
commitaf527e02dce280c269d751322e9f60aac8cb97da (patch)
tree19faf6d47cdd3d589a6dfcff0f8f75fcbb03aa20 /include/images/SkImageRef.h
parent5956d1c224aadf1d2712b46b32d3fc69a19915bd (diff)
downloadexternal_skia-af527e02dce280c269d751322e9f60aac8cb97da.zip
external_skia-af527e02dce280c269d751322e9f60aac8cb97da.tar.gz
external_skia-af527e02dce280c269d751322e9f60aac8cb97da.tar.bz2
auto import from //branches/cupcake_rel/...@140373
Diffstat (limited to 'include/images/SkImageRef.h')
-rw-r--r--include/images/SkImageRef.h19
1 files changed, 12 insertions, 7 deletions
diff --git a/include/images/SkImageRef.h b/include/images/SkImageRef.h
index e94b7d4..6ab6e52 100644
--- a/include/images/SkImageRef.h
+++ b/include/images/SkImageRef.h
@@ -35,9 +35,9 @@ public:
that this imageref is the only owner of the stream. i.e. - sole
ownership of the stream object is transferred to this imageref object.
- @param stream The stream containing the encoded image data. Ownership
- of this stream is transferred to the imageref, and
- therefore the stream's ownercount must be 1.
+ @param stream The stream containing the encoded image data. This may be
+ retained (by calling ref()), so the caller should not
+ explicitly delete it.
@param config The preferred config of the decoded bitmap.
@param sampleSize Requested sampleSize for decoding. Defaults to 1.
*/
@@ -52,6 +52,10 @@ public:
and ignore the bitmap parameter.
*/
bool getInfo(SkBitmap* bm);
+
+ SkImageDecoderFactory* getDecoderFactory() const { return fFactory; }
+ // returns the factory parameter
+ SkImageDecoderFactory* setDecoderFactory(SkImageDecoderFactory*);
// overrides
virtual void flatten(SkFlattenableWriteBuffer&) const;
@@ -81,10 +85,11 @@ private:
// requested state (or further, i.e. has pixels)
bool prepareBitmap(SkImageDecoder::Mode);
- SkStream* fStream;
- SkBitmap::Config fConfig;
- int fSampleSize;
- bool fErrorInDecoding;
+ SkImageDecoderFactory* fFactory; // may be null
+ SkStream* fStream;
+ SkBitmap::Config fConfig;
+ int fSampleSize;
+ bool fErrorInDecoding;
friend class SkImageRefPool;