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

Unified Diff: src/ports/SkFontHost_win.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/SkFontHost_mac.cpp ('k') | src/ports/SkFontMgr_android.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ports/SkFontHost_win.cpp
diff --git a/src/ports/SkFontHost_win.cpp b/src/ports/SkFontHost_win.cpp
index 70f3ddfdf8a38f2e55c243e703c1e913b31d3a9b..a1d92fc21611a6ea4e34a4a93f4820c891f5fa4b 100755
--- a/src/ports/SkFontHost_win.cpp
+++ b/src/ports/SkFontHost_win.cpp
@@ -255,7 +255,7 @@ public:
}
protected:
- SkStream* onOpenStream(int* ttcIndex) const SK_OVERRIDE;
+ SkStreamAsset* onOpenStream(int* ttcIndex) const SK_OVERRIDE;
SkScalerContext* onCreateScalerContext(const SkDescriptor*) const SK_OVERRIDE;
void onFilterRec(SkScalerContextRec*) const SK_OVERRIDE;
virtual SkAdvancedTypefaceMetrics* onGetAdvancedTypefaceMetrics(
@@ -1925,7 +1925,7 @@ static HANDLE activate_font(SkData* fontData) {
}
// Does not affect ownership of stream.
-static SkTypeface* create_from_stream(SkStream* stream) {
+static SkTypeface* create_from_stream(SkStreamAsset* stream) {
// Create a unique and unpredictable font name.
// Avoids collisions and access from CSS.
char familyName[BASE64_GUID_ID_LEN];
@@ -1953,7 +1953,7 @@ static SkTypeface* create_from_stream(SkStream* stream) {
return SkCreateFontMemResourceTypefaceFromLOGFONT(lf, fontReference);
}
-SkStream* LogFontTypeface::onOpenStream(int* ttcIndex) const {
+SkStreamAsset* LogFontTypeface::onOpenStream(int* ttcIndex) const {
*ttcIndex = 0;
const DWORD kTTCTag =
@@ -2481,8 +2481,8 @@ protected:
return this->matchFamilyStyle(familyName.c_str(), fontstyle);
}
- SkTypeface* onCreateFromStream(SkStream* stream, int ttcIndex) const SK_OVERRIDE {
- SkAutoTDelete<SkStream> streamDeleter(stream);
+ SkTypeface* onCreateFromStream(SkStreamAsset* bareStream, int ttcIndex) const SK_OVERRIDE {
+ SkAutoTDelete<SkStreamAsset> stream(bareStream);
return create_from_stream(stream);
}
« no previous file with comments | « src/ports/SkFontHost_mac.cpp ('k') | src/ports/SkFontMgr_android.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698