Reland "remove SK_SUPPORT_LEGACY_TYPEFACE_MAKEFROMSTREAM"

This reverts commit b8e125281d.

Reason for revert: flutter has landed in fuchsia

Original change's description:
> Revert "remove SK_SUPPORT_LEGACY_TYPEFACE_MAKEFROMSTREAM"
> 
> This reverts commit 558fabb31c.
> 
> Reason for revert: flutter hasnt rolled into fuschia so this breaks fuschia
> 
> Original change's description:
> > remove SK_SUPPORT_LEGACY_TYPEFACE_MAKEFROMSTREAM
> > 
> > ... now that Brian updated Flutter's callsites
> > 
> > Bug: skia:8350
> > Change-Id: I5ae72700125e09d84392eee8045c9602f718909a
> > Reviewed-on: https://skia-review.googlesource.com/153901
> > Reviewed-by: Brian Osman <brianosman@google.com>
> > Commit-Queue: Brian Osman <brianosman@google.com>
> > Auto-Submit: Mike Reed <reed@google.com>
> 
> TBR=brianosman@google.com,reed@google.com
> 
> Change-Id: I263e3c7694895ac85dc71a785832e7fb89dc81de
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:8350
> Reviewed-on: https://skia-review.googlesource.com/154081
> Reviewed-by: Cary Clark <caryclark@skia.org>
> Commit-Queue: Cary Clark <caryclark@skia.org>

TBR=brianosman@google.com,reed@google.com,caryclark@skia.org

Change-Id: Iabf3c78c883275c0256b31bcde87d4cdc8eecbec
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:8350
Reviewed-on: https://skia-review.googlesource.com/154302
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
This commit is contained in:
Mike Reed 2018-09-13 15:19:02 +00:00 committed by Skia Commit-Bot
parent 96519f2835
commit 5152c4acfb
3 changed files with 0 additions and 13 deletions

View File

@ -7,5 +7,4 @@ flutter_defines = [
"SK_DISABLE_RENDER_TARGET_SORTING",
"SK_SUPPORT_LEGACY_VULKAN_INTERFACE",
"SK_LEGACY_SKCODEC_NONE_ENUM",
"SK_SUPPORT_LEGACY_TYPEFACE_MAKEFROMSTREAM",
]

View File

@ -129,11 +129,6 @@ public:
*/
static sk_sp<SkTypeface> MakeFromStream(std::unique_ptr<SkStreamAsset> stream, int index = 0);
#ifdef SK_SUPPORT_LEGACY_TYPEFACE_MAKEFROMSTREAM
// DEPRECATED -- call the version that takes unique_ptr
static sk_sp<SkTypeface> MakeFromStream(SkStreamAsset* stream, int index = 0);
#endif
/** Return a new typeface given a SkData. If the data is null, or is not a valid font file,
* returns nullptr.
*/

View File

@ -145,13 +145,6 @@ sk_sp<SkTypeface> SkTypeface::MakeFromName(const char name[],
return SkFontMgr::RefDefault()->legacyMakeTypeface(name, fontStyle);
}
#ifdef SK_SUPPORT_LEGACY_TYPEFACE_MAKEFROMSTREAM
// DEPRECATED
sk_sp<SkTypeface> SkTypeface::MakeFromStream(SkStreamAsset* stream, int index) {
return MakeFromStream(std::unique_ptr<SkStreamAsset>(stream), index);
}
#endif
sk_sp<SkTypeface> SkTypeface::MakeFromStream(std::unique_ptr<SkStreamAsset> stream, int index) {
if (!stream) {
return nullptr;