remove dead code around SK_SUPPORT_LEGACY_TEXTBLOB_SERIAL_API

Bug: skia:
Change-Id: Ifcf6054871d907efeb2fcf2815bc4c25671525b6
Reviewed-on: https://skia-review.googlesource.com/25944
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
This commit is contained in:
Mike Reed 2017-07-22 14:01:58 -04:00 committed by Skia Commit-Bot
parent 8724b46099
commit 31599e98df
2 changed files with 0 additions and 27 deletions

View File

@ -17,11 +17,6 @@
class SkReadBuffer;
class SkWriteBuffer;
#ifdef SK_SUPPORT_LEGACY_TEXTBLOB_SERIAL_API
typedef std::function<void(SkTypeface*)> SkTypefaceCataloger;
typedef std::function<sk_sp<SkTypeface>(uint32_t)> SkTypefaceResolver;
#endif
typedef void (*SkTypefaceCatalogerProc)(SkTypeface*, void* ctx);
typedef sk_sp<SkTypeface> (*SkTypefaceResolverProc)(uint32_t id, void* ctx);
@ -80,11 +75,6 @@ public:
static sk_sp<SkTextBlob> Deserialize(const void* data, size_t size,
SkTypefaceResolverProc, void* ctx);
#ifdef SK_SUPPORT_LEGACY_TEXTBLOB_SERIAL_API
sk_sp<SkData> serialize(const SkTypefaceCataloger&) const;
static sk_sp<SkTextBlob> Deserialize(const void* data, size_t size, const SkTypefaceResolver&);
#endif
private:
friend class SkNVRefCnt<SkTextBlob>;
class RunRecord;

View File

@ -862,20 +862,3 @@ sk_sp<SkTextBlob> SkTextBlob::Deserialize(const void* data, size_t length,
SkTypefaceResolverReadBuffer buffer(data, length, proc, ctx);
return SkTextBlob::MakeFromBuffer(buffer);
}
#ifdef SK_SUPPORT_LEGACY_TEXTBLOB_SERIAL_API
sk_sp<SkData> SkTextBlob::serialize(const SkTypefaceCataloger& cataloger) const {
return this->serialize([](SkTypeface* tf, void* ctx) {
const SkTypefaceCataloger& cataloger = *(const SkTypefaceCataloger*)ctx;
cataloger(tf);
}, (void*)&cataloger);
}
sk_sp<SkTextBlob> SkTextBlob::Deserialize(const void* data, size_t length,
const SkTypefaceResolver& resolver) {
return Deserialize(data, length, [](uint32_t id, void* ctx) {
const SkTypefaceResolver& resolver = *(const SkTypefaceResolver*)ctx;
return resolver(id);
}, (void*)&resolver);
}
#endif