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

Unified Diff: src/core/SkTypeface.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/core/SkFontMgr.cpp ('k') | src/fonts/SkFontMgr_fontconfig.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkTypeface.cpp
diff --git a/src/core/SkTypeface.cpp b/src/core/SkTypeface.cpp
index b86cfa7cafe223978300a00a1213e77195101a57..84cab097e0518ef458a09133507db4480037a139 100644
--- a/src/core/SkTypeface.cpp
+++ b/src/core/SkTypeface.cpp
@@ -29,7 +29,7 @@ public:
protected:
SkEmptyTypeface() : SkTypeface(SkFontStyle(), 0, true) { }
- SkStream* onOpenStream(int* ttcIndex) const SK_OVERRIDE { return NULL; }
+ SkStreamAsset* onOpenStream(int* ttcIndex) const SK_OVERRIDE { return NULL; }
SkScalerContext* onCreateScalerContext(const SkDescriptor*) const SK_OVERRIDE {
return NULL;
}
@@ -138,7 +138,7 @@ SkTypeface* SkTypeface::CreateFromTypeface(const SkTypeface* family, Style s) {
return fm->matchFaceStyle(family, newStyle);
}
-SkTypeface* SkTypeface::CreateFromStream(SkStream* stream, int index) {
+SkTypeface* SkTypeface::CreateFromStream(SkStreamAsset* stream, int index) {
SkAutoTUnref<SkFontMgr> fm(SkFontMgr::RefDefault());
return fm->createFromStream(stream, index);
}
@@ -180,7 +180,7 @@ void SkTypeface::serializeForcingEmbedding(SkWStream* wstream) const {
SkTypeface* SkTypeface::Deserialize(SkStream* stream) {
SkFontDescriptor desc(stream);
- SkStream* data = desc.transferFontData();
+ SkStreamAsset* data = desc.transferFontData();
if (data) {
SkTypeface* typeface = SkTypeface::CreateFromStream(data, desc.getFontIndex());
if (typeface) {
@@ -209,7 +209,7 @@ size_t SkTypeface::getTableData(SkFontTableTag tag, size_t offset, size_t length
return this->onGetTableData(tag, offset, length, data);
}
-SkStream* SkTypeface::openStream(int* ttcIndex) const {
+SkStreamAsset* SkTypeface::openStream(int* ttcIndex) const {
int ttcIndexStorage;
if (NULL == ttcIndex) {
// So our subclasses don't need to check for null param
« no previous file with comments | « src/core/SkFontMgr.cpp ('k') | src/fonts/SkFontMgr_fontconfig.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698