Chromium Code Reviews| Index: include/core/SkPicture.h |
| diff --git a/include/core/SkPicture.h b/include/core/SkPicture.h |
| index 75fe66d2bf92fe562311dd6e16c89506b33cfeed..717e36d341b545c61e4d0ebfd5c14dba3ed54d3c 100644 |
| --- a/include/core/SkPicture.h |
| +++ b/include/core/SkPicture.h |
| @@ -16,6 +16,9 @@ class GrContext; |
| class SkBigPicture; |
| class SkBitmap; |
| class SkCanvas; |
| +class SkData; |
| +class SkImage; |
| +class SkImageDeserializer; |
| class SkPath; |
| class SkPictureData; |
| class SkPixelSerializer; |
| @@ -49,6 +52,7 @@ public: |
| */ |
| typedef bool (*InstallPixelRefProc)(const void* src, size_t length, SkBitmap* dst); |
| +#ifdef SK_SUPPORT_LEGACY_PICTUREINSTALLPIXELREF |
| /** |
| * Recreate a picture that was serialized into a stream. |
| * @param SkStream Serialized picture data. Ownership is unchanged by this call. |
| @@ -58,6 +62,9 @@ public: |
| * invalid. |
| */ |
| static sk_sp<SkPicture> MakeFromStream(SkStream*, InstallPixelRefProc proc); |
| +#endif |
| + |
| + static sk_sp<SkPicture> MakeFromStream(SkStream*, SkImageDeserializer*); |
| /** |
| * Recreate a picture that was serialized into a stream. |
| @@ -70,6 +77,9 @@ public: |
| * invalid. |
| */ |
| static sk_sp<SkPicture> MakeFromStream(SkStream*); |
| + static sk_sp<SkPicture> MakeFromStream(SkStream* stream, std::nullptr_t) { |
|
mtklein
2016/08/10 21:48:31
Confused. Are you sure we need two MakeFromStream
reed1
2016/08/10 23:43:19
This is needed as chrome has callers today that pa
|
| + return MakeFromStream(stream); |
| + } |
| /** |
| * Recreate a picture that was serialized into a buffer. If the creation requires bitmap |
| @@ -188,7 +198,8 @@ private: |
| template <typename> friend class SkMiniPicture; |
| void serialize(SkWStream*, SkPixelSerializer*, SkRefCntSet* typefaces) const; |
| - static sk_sp<SkPicture> MakeFromStream(SkStream*, InstallPixelRefProc, SkTypefacePlayback*); |
| +// static sk_sp<SkPicture> MakeFromStream(SkStream*, InstallPixelRefProc, SkTypefacePlayback*); |
| + static sk_sp<SkPicture> MakeFromStream(SkStream*, SkImageDeserializer*, SkTypefacePlayback*); |
| friend class SkPictureData; |
| virtual int numSlowPaths() const = 0; |