diff options
author | Cary Clark <caryclark@skia.org> | 2018-05-21 11:56:57 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-05-21 17:33:39 +0000 |
commit | 4dc5a454052e64227ecbfadd903f590d9361be08 (patch) | |
tree | 7d22319f9e739fdc12490ad124d3e19bed5bb2bd /include/core/SkMaskFilter.h | |
parent | 435282162ed6f69f86f8ec2c83ea9b4439a7a7d4 (diff) |
remove defines and add commas
Preparation for generating bookmaker files for all remaining
interfaces
Standardize enum and enum classes by including a comma after
the last entry.
Replace flatten-related #define in public interfaces
with their equivalent.
The motivation is to give documentation something to refer to.
An alternative would be to move part or all of this out of the
public interface; something I can work on in a follow-up CL.
R=reed@google.com,bsalomon@google.com
Bug: skia:6898
Change-Id: I4b865f6ec3d8f5d31e50448fef7d2714510302f0
Reviewed-on: https://skia-review.googlesource.com/129312
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Cary Clark <caryclark@skia.org>
Diffstat (limited to 'include/core/SkMaskFilter.h')
-rw-r--r-- | include/core/SkMaskFilter.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/include/core/SkMaskFilter.h b/include/core/SkMaskFilter.h index bd2a20b825..8158e7a3eb 100644 --- a/include/core/SkMaskFilter.h +++ b/include/core/SkMaskFilter.h @@ -60,7 +60,21 @@ public: sk_sp<SkMaskFilter> makeWithMatrix(const SkMatrix&) const; virtual void toString(SkString* str) const = 0; - SK_DEFINE_FLATTENABLE_TYPE(SkMaskFilter) + + static SkFlattenable::Type GetFlattenableType() { + return kSkMaskFilter_Type; + } + + SkFlattenable::Type getFlattenableType() const override { + return kSkMaskFilter_Type; + } + + static sk_sp<SkMaskFilter> Deserialize(const void* data, size_t size, + const SkDeserialProcs* procs = nullptr) { + return sk_sp<SkMaskFilter>(static_cast<SkMaskFilter*>( + SkFlattenable::Deserialize( + kSkMaskFilter_Type, data, size, procs).release())); + } private: static void InitializeFlattenables(); |