diff options
author | Mike Reed <reed@google.com> | 2017-12-15 17:26:48 +0000 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-12-15 17:26:59 +0000 |
commit | 36d71787929002511edc37663b56d5909d2600cf (patch) | |
tree | d413eddca281a1d5c6dc4e68f252edb022a6b0b8 /include | |
parent | d7b3845f3d3f3498c2adc542b4b20003ac7d3ab0 (diff) |
Revert "hide SkImageDeserializer"
This reverts commit 834fb8ed906984739aee6b61417afddb9c6e469c.
Reason for revert: broke google3
Original change's description:
> hide SkImageDeserializer
>
> Bug: skia:
> Change-Id: I1cd4e8c626628a3e6426afd7d6bae628d58989c3
> Reviewed-on: https://skia-review.googlesource.com/85743
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Reed <reed@google.com>
TBR=reed@google.com,reed@chromium.org
Change-Id: I00679c8651817af1777785da6c8dac9411a2a7c2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/85880
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/core/SkImageDeserializer.h | 2 | ||||
-rw-r--r-- | include/core/SkPicture.h | 12 | ||||
-rw-r--r-- | include/core/SkWriteBuffer.h | 8 |
3 files changed, 11 insertions, 11 deletions
diff --git a/include/core/SkImageDeserializer.h b/include/core/SkImageDeserializer.h index a8e37b69f0..ba1422647b 100644 --- a/include/core/SkImageDeserializer.h +++ b/include/core/SkImageDeserializer.h @@ -14,7 +14,6 @@ struct SkIRect; class SkData; class SkImage; -#ifdef SK_SUPPORT_LEGACY_IMAGEDESERIALIZER class SK_API SkImageDeserializer { public: virtual ~SkImageDeserializer() {} @@ -33,6 +32,5 @@ public: virtual sk_sp<SkImage> makeFromData(SkData*, const SkIRect* subset); virtual sk_sp<SkImage> makeFromMemory(const void* data, size_t length, const SkIRect* subset); }; -#endif #endif diff --git a/include/core/SkPicture.h b/include/core/SkPicture.h index cb8dcc2215..1e32636ca3 100644 --- a/include/core/SkPicture.h +++ b/include/core/SkPicture.h @@ -19,9 +19,7 @@ class SkCanvas; class SkData; struct SkDeserialProcs; class SkImage; -#ifdef SK_SUPPORT_LEGACY_IMAGEDESERIALIZER class SkImageDeserializer; -#endif class SkPath; class SkPictureData; class SkPixelSerializer; @@ -60,15 +58,11 @@ public: * Any serialized images in the stream will be passed the image-deserializer, or if that is * null, to the default deserializer that will call SkImage::MakeFromEncoded(). */ -#ifdef SK_SUPPORT_LEGACY_IMAGEDESERIALIZER static sk_sp<SkPicture> MakeFromStream(SkStream*, SkImageDeserializer*); - static sk_sp<SkPicture> MakeFromData(const SkData* data, SkImageDeserializer*); - static sk_sp<SkPicture> MakeFromData(const void* data, size_t size, SkImageDeserializer*); -#endif - static sk_sp<SkPicture> MakeFromStream(SkStream*); - static sk_sp<SkPicture> MakeFromData(const SkData* data); - static sk_sp<SkPicture> MakeFromData(const void* data, size_t size); + static sk_sp<SkPicture> MakeFromData(const void* data, size_t size, + SkImageDeserializer* = nullptr); + static sk_sp<SkPicture> MakeFromData(const SkData* data, SkImageDeserializer* = nullptr); static sk_sp<SkPicture> MakeFromStream(SkStream*, const SkDeserialProcs& procs); static sk_sp<SkPicture> MakeFromData(const SkData* data, const SkDeserialProcs& procs); diff --git a/include/core/SkWriteBuffer.h b/include/core/SkWriteBuffer.h index 0b1ae0c1aa..b0b6fd993a 100644 --- a/include/core/SkWriteBuffer.h +++ b/include/core/SkWriteBuffer.h @@ -9,6 +9,8 @@ #ifndef SkWriteBuffer_DEFINED #define SkWriteBuffer_DEFINED +#define SK_SUPPORT_LEGACY_SERIAL_BUFFER_OBJECTS + #include "SkData.h" #include "SkImage.h" #include "SkPath.h" @@ -18,7 +20,9 @@ #include "SkWriter32.h" #include "../private/SkTHash.h" +#ifdef SK_SUPPORT_LEGACY_SERIAL_BUFFER_OBJECTS #include "SkPixelSerializer.h" +#endif class SkBitmap; class SkDeduper; @@ -153,7 +157,9 @@ public: SkFactorySet* setFactoryRecorder(SkFactorySet*); SkRefCntSet* setTypefaceRecorder(SkRefCntSet*); +#ifdef SK_SUPPORT_LEGACY_SERIAL_BUFFER_OBJECTS void setPixelSerializer(sk_sp<SkPixelSerializer>); +#endif private: const uint32_t fFlags; @@ -165,7 +171,9 @@ private: // Only used if we do not have an fFactorySet SkTHashMap<SkString, uint32_t> fFlattenableDict; +#ifdef SK_SUPPORT_LEGACY_SERIAL_BUFFER_OBJECTS sk_sp<SkPixelSerializer> fPS; +#endif }; #endif // SkWriteBuffer_DEFINED |