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

Unified Diff: src/ports/SkFontHost_linux.cpp

Issue 1057413005: Remove filename from SkFontDescriptor. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add file name to assert. Created 5 years, 8 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/fonts/SkTestScalerContext.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_linux.cpp
diff --git a/src/ports/SkFontHost_linux.cpp b/src/ports/SkFontHost_linux.cpp
index 5d62e367f0a736580f61bf28413794da7548925d..da2c2d00d14fb92f4c85c44daaea4944a905dfd2 100644
--- a/src/ports/SkFontHost_linux.cpp
+++ b/src/ports/SkFontHost_linux.cpp
@@ -32,8 +32,6 @@ public:
bool isSysFont() const { return fIsSysFont; }
- virtual const char* getUniqueString() const = 0;
-
protected:
void onGetFamilyName(SkString* familyName) const override {
*familyName = fFamilyName;
@@ -41,7 +39,6 @@ protected:
void onGetFontDescriptor(SkFontDescriptor* desc, bool* isLocal) const override {
desc->setFamilyName(fFamilyName.c_str());
- desc->setFontFileName(this->getUniqueString());
desc->setFontIndex(fIndex);
*isLocal = !this->isSysFont();
}
@@ -63,8 +60,6 @@ class SkTypeface_Empty : public SkTypeface_Custom {
public:
SkTypeface_Empty() : INHERITED(SkFontStyle(), false, true, SkString(), 0) {}
- const char* getUniqueString() const override { return NULL; }
-
protected:
SkStreamAsset* onOpenStream(int*) const override { return NULL; }
@@ -81,8 +76,6 @@ public:
, fStream(stream)
{ }
- const char* getUniqueString() const override { return NULL; }
-
protected:
SkStreamAsset* onOpenStream(int* ttcIndex) const override {
*ttcIndex = this->getIndex();
@@ -112,14 +105,6 @@ public:
, fStream(c_CustomTypefaceRetain ? SkStream::NewFromFile(fPath.c_str()) : NULL)
{ }
- const char* getUniqueString() const override {
- const char* str = strrchr(fPath.c_str(), '/');
- if (str) {
- str += 1; // skip the '/'
- }
- return str;
- }
-
protected:
SkStreamAsset* onOpenStream(int* ttcIndex) const override {
*ttcIndex = this->getIndex();
« no previous file with comments | « src/fonts/SkTestScalerContext.cpp ('k') | src/ports/SkFontMgr_android.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698