Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(750)

Unified Diff: src/ports/SkFontMgr_fontconfig.cpp

Issue 869763002: SkTypeface to use SkStreamAsset. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/ports/SkFontMgr_android.cpp ('k') | src/ports/SkFontMgr_win_dw.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ports/SkFontMgr_fontconfig.cpp
diff --git a/src/ports/SkFontMgr_fontconfig.cpp b/src/ports/SkFontMgr_fontconfig.cpp
index 28df5d479093ae92997726774ecec60ab570afc5..a0e45facf6b88c67dbb64d84fb2f07d0e7cbe261 100644
--- a/src/ports/SkFontMgr_fontconfig.cpp
+++ b/src/ports/SkFontMgr_fontconfig.cpp
@@ -391,7 +391,7 @@ public:
*serialize = true;
}
- SkStream* onOpenStream(int* ttcIndex) const SK_OVERRIDE {
+ SkStreamAsset* onOpenStream(int* ttcIndex) const SK_OVERRIDE {
*ttcIndex = fIndex;
return fStream->duplicate();
}
@@ -425,7 +425,7 @@ public:
*serialize = false;
}
- SkStream* onOpenStream(int* ttcIndex) const SK_OVERRIDE {
+ SkStreamAsset* onOpenStream(int* ttcIndex) const SK_OVERRIDE {
FCLocker lock;
*ttcIndex = get_int(fPattern, FC_INDEX, 0);
return SkStream::NewFromFile(get_string(fPattern, FC_FILE));
@@ -809,8 +809,8 @@ protected:
return this->matchFamilyStyle(get_string(fcTypeface->fPattern, FC_FAMILY), style);
}
- SkTypeface* onCreateFromStream(SkStream* inputStream, int ttcIndex) const SK_OVERRIDE {
- SkAutoTDelete<SkStream> stream(inputStream);
+ SkTypeface* onCreateFromStream(SkStreamAsset* bareStream, int ttcIndex) const SK_OVERRIDE {
+ SkAutoTDelete<SkStreamAsset> stream(bareStream);
const size_t length = stream->getLength();
if (length <= 0 || (1u << 30) < length) {
return NULL;
« no previous file with comments | « src/ports/SkFontMgr_android.cpp ('k') | src/ports/SkFontMgr_win_dw.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698