diff options
author | Mike Reed <reed@google.com> | 2017-12-13 15:16:43 +0000 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-12-13 15:16:53 +0000 |
commit | 2a3009931d7bb0f5ca31490c4cf19eef205e4e7a (patch) | |
tree | 0e560343dccf1aef830d0eb24ac35e3790f54f9f /include | |
parent | 76d917cef19aabfdc1247336f58237800bd71875 (diff) |
Revert "impl SkSerial picture procs"
This reverts commit c8226728541fdd6434a7f1b97678246202b0edc5.
Reason for revert: broke old skps
Original change's description:
> impl SkSerial picture procs
>
> The picture serialization code is a bit of a mess, with duplicated functions for streams and buffers.
> Could not see how to fix that and land this at the same time, but I will try to circle back and
> simplify if possible afterwards.
>
> Bug: skia:
> Change-Id: I9053fdc476c60f483df013d021e248258181c199
> Reviewed-on: https://skia-review.googlesource.com/83943
> Reviewed-by: Florin Malita <fmalita@chromium.org>
> Commit-Queue: Mike Reed <reed@google.com>
TBR=mtklein@google.com,fmalita@chromium.org,reed@google.com
Change-Id: I68ae019a286691b65cc373cb29c941d6620fd34a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/84460
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/core/SkWriteBuffer.h | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/include/core/SkWriteBuffer.h b/include/core/SkWriteBuffer.h index b0b6fd993a..42d8f96eb9 100644 --- a/include/core/SkWriteBuffer.h +++ b/include/core/SkWriteBuffer.h @@ -37,8 +37,6 @@ public: virtual bool isCrossProcess() const = 0; - virtual void writePad32(const void* buffer, size_t bytes) = 0; - virtual void writeByteArray(const void* data, size_t size) = 0; void writeDataAsByteArray(SkData* data) { this->writeByteArray(data->data(), data->size()); @@ -85,14 +83,9 @@ public: */ void setClientContext(void* ctx) { fClientCtx = ctx; } - void setSerialProcs(const SkSerialProcs& procs) { fProcs = procs; } - protected: - SkDeduper* fDeduper = nullptr; - void* fClientCtx = nullptr; - SkSerialProcs fProcs; - - friend class SkPicture; // fProcs + SkDeduper* fDeduper = nullptr; + void* fClientCtx = nullptr; }; /** @@ -115,7 +108,7 @@ public: void write(const void* buffer, size_t bytes) { fWriter.write(buffer, bytes); } - void writePad32(const void* buffer, size_t bytes) override { + void writePad32(const void* buffer, size_t bytes) { fWriter.writePad(buffer, bytes); } @@ -157,6 +150,8 @@ public: SkFactorySet* setFactoryRecorder(SkFactorySet*); SkRefCntSet* setTypefaceRecorder(SkRefCntSet*); + void setSerialProcs(const SkSerialProcs& procs) { fProcs = procs; } + #ifdef SK_SUPPORT_LEGACY_SERIAL_BUFFER_OBJECTS void setPixelSerializer(sk_sp<SkPixelSerializer>); #endif @@ -167,6 +162,7 @@ private: SkWriter32 fWriter; SkRefCntSet* fTFSet; + SkSerialProcs fProcs; // Only used if we do not have an fFactorySet SkTHashMap<SkString, uint32_t> fFlattenableDict; |