aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar scroggo <scroggo@google.com>2016-02-10 11:15:21 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2016-02-10 11:15:21 -0800
commit026388a01864c74208ad57d1ba4f711602d101c6 (patch)
tree52c2bc5b1e93002f6011feb56c35996c5f0b7d61 /include
parentb5b497423c581cda24f65dcc7b274fe79ef79588 (diff)
Make SkPicture/SkImageGenerator default to SkCodec
Remove reference to SkImageDecoder from SkPicture. Make the default InstallPixelRefProc passed to CreateFromStream use SkImageGenerator::NewFromEncoded instead. Make SkImageGenerator::NewFromEncoded create an SkCodecImageGenerator. Remove the old version that used SkImageDecoder. Remove all versions of lazy_decode_bitmap/LazyDecodeBitmap. The default now behaves lazily. Update all clients to use the default. Move SkImageDecoderGenerator into KtxTest.cpp, and use it directly. BUG=skia:4691 BUG=skia:4290 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1671193002 Review URL: https://codereview.chromium.org/1671193002
Diffstat (limited to 'include')
-rw-r--r--include/core/SkPicture.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/include/core/SkPicture.h b/include/core/SkPicture.h
index 720747e9a3..7c8c187fd8 100644
--- a/include/core/SkPicture.h
+++ b/include/core/SkPicture.h
@@ -54,8 +54,19 @@ public:
* @return A new SkPicture representing the serialized data, or NULL if the stream is
* invalid.
*/
- static SkPicture* CreateFromStream(SkStream*,
- InstallPixelRefProc proc = &SkImageDecoder::DecodeMemory);
+ static SkPicture* CreateFromStream(SkStream*, InstallPixelRefProc proc);
+
+ /**
+ * Recreate a picture that was serialized into a stream.
+ *
+ * Any serialized images in the stream will be passed to
+ * SkImageGenerator::NewFromEncoded.
+ *
+ * @param SkStream Serialized picture data. Ownership is unchanged by this call.
+ * @return A new SkPicture representing the serialized data, or NULL if the stream is
+ * invalid.
+ */
+ static SkPicture* CreateFromStream(SkStream*);
/**
* Recreate a picture that was serialized into a buffer. If the creation requires bitmap