Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 8695539

Browse files
reed-at-googleSkia Commit-Bot
authored andcommitted
Revert "Revert "update to new MakeFromStream signature""
This reverts commit 71f8475. Modified to still expose old signature (until we update google3 and flutter) Bug: skia: Change-Id: Ie51e6227d5c6961d90006a015a5292cebd49e2a2 Reviewed-on: https://skia-review.googlesource.com/152560 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
1 parent b090b2b commit 8695539

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

include/ports/SkFontConfigInterface.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
#include "SkFontStyle.h"
1212
#include "SkRefCnt.h"
13+
#include "SkStream.h"
1314
#include "SkTypeface.h"
1415

1516
class SkFontMgr;
@@ -97,7 +98,9 @@ class SK_API SkFontConfigInterface : public SkRefCnt {
9798
* openStream(), but derived classes may implement more complex caching schemes.
9899
*/
99100
virtual sk_sp<SkTypeface> makeTypeface(const FontIdentity& identity) {
100-
return SkTypeface::MakeFromStream(this->openStream(identity), identity.fTTCIndex);
101+
return SkTypeface::MakeFromStream(std::unique_ptr<SkStreamAsset>(this->openStream(identity)),
102+
identity.fTTCIndex);
103+
101104
}
102105

103106
/**

src/core/SkTypeface.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -145,13 +145,6 @@ sk_sp<SkTypeface> SkTypeface::MakeFromName(const char name[],
145145
return SkFontMgr::RefDefault()->legacyMakeTypeface(name, fontStyle);
146146
}
147147

148-
#ifdef SK_SUPPORT_LEGACY_TYPEFACE_MAKEFROMSTREAM
149-
// DEPRECATED
150-
sk_sp<SkTypeface> SkTypeface::MakeFromStream(SkStreamAsset* stream, int index) {
151-
return MakeFromStream(std::unique_ptr<SkStreamAsset>(stream), index);
152-
}
153-
#endif
154-
155148
sk_sp<SkTypeface> SkTypeface::MakeFromStream(std::unique_ptr<SkStreamAsset> stream, int index) {
156149
if (!stream) {
157150
return nullptr;

0 commit comments

Comments
 (0)