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

Commit 0b80e62

Browse files
jvanverthSkia Commit-Bot
authored andcommitted
Reland "Revert "update to new MakeFromStream signature""
This reverts commit 8695539. Reason for revert: Breaking the Housekeeper bot. Original change's description: > 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> TBR=reed@google.com Change-Id: I731108dac57aac090420594dc19e42c217f51b06 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/152600 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
1 parent 8695539 commit 0b80e62

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

include/ports/SkFontConfigInterface.h

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

1111
#include "SkFontStyle.h"
1212
#include "SkRefCnt.h"
13-
#include "SkStream.h"
1413
#include "SkTypeface.h"
1514

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

106103
/**

src/core/SkTypeface.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,13 @@ 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+
148155
sk_sp<SkTypeface> SkTypeface::MakeFromStream(std::unique_ptr<SkStreamAsset> stream, int index) {
149156
if (!stream) {
150157
return nullptr;

0 commit comments

Comments
 (0)