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

Unified Diff: src/ports/SkFontHost_fontconfig.cpp

Issue 924333003: Remove FontConfigTypeface::getFamilyName(). (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 10 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/SkFontConfigTypeface.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ports/SkFontHost_fontconfig.cpp
diff --git a/src/ports/SkFontHost_fontconfig.cpp b/src/ports/SkFontHost_fontconfig.cpp
index 591e9d5aed682fb851255d6f45082df856ad62da..aaee67a74e328687ef8fce10ae293972f696cc6c 100644
--- a/src/ports/SkFontHost_fontconfig.cpp
+++ b/src/ports/SkFontHost_fontconfig.cpp
@@ -85,9 +85,10 @@ SkTypeface* FontConfigTypeface::LegacyCreateTypeface(
return NULL;
}
+ SkString familyFaceName;
if (familyFace) {
bungeman-skia 2015/02/18 21:05:49 It turns out we never actually come down this path
- FontConfigTypeface* fct = (FontConfigTypeface*)familyFace;
- familyName = fct->getFamilyName();
+ familyFace->getFamilyName(&familyFaceName);
+ familyName = familyFaceName.c_str();
}
SkFontStyle requestedStyle(style);
@@ -144,12 +145,14 @@ SkStreamAsset* FontConfigTypeface::onOpenStream(int* ttcIndex) const {
}
void FontConfigTypeface::onGetFamilyName(SkString* familyName) const {
- *familyName = this->getFamilyName();
+ *familyName = fFamilyName;
}
void FontConfigTypeface::onGetFontDescriptor(SkFontDescriptor* desc,
bool* isLocalStream) const {
- desc->setFamilyName(this->getFamilyName());
+ SkString name;
+ this->getFamilyName(&name);
+ desc->setFamilyName(name.c_str());
desc->setFontIndex(this->getIdentity().fTTCIndex);
*isLocalStream = SkToBool(this->getLocalStream());
}
« no previous file with comments | « src/ports/SkFontConfigTypeface.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698