Index: src/core/SkFontHost.cpp |
diff --git a/src/core/SkFontHost.cpp b/src/core/SkFontHost.cpp |
index a209b970278215bc381326aeea6c00fd18e3f75c..fa20b47e10e773223c76e32dec112e9c02ff11e7 100644 |
--- a/src/core/SkFontHost.cpp |
+++ b/src/core/SkFontHost.cpp |
@@ -92,38 +92,38 @@ SkFontStyleSet* SkFontStyleSet::CreateEmpty() { |
class SkEmptyFontMgr : public SkFontMgr { |
protected: |
- virtual int onCountFamilies() SK_OVERRIDE { |
+ virtual int onCountFamilies() const SK_OVERRIDE { |
return 0; |
} |
- virtual void onGetFamilyName(int index, SkString* familyName) SK_OVERRIDE { |
+ virtual void onGetFamilyName(int index, SkString* familyName) const SK_OVERRIDE { |
SkDEBUGFAIL("onGetFamilyName called with bad index"); |
} |
- virtual SkFontStyleSet* onCreateStyleSet(int index) SK_OVERRIDE { |
+ virtual SkFontStyleSet* onCreateStyleSet(int index) const SK_OVERRIDE { |
SkDEBUGFAIL("onCreateStyleSet called with bad index"); |
return NULL; |
} |
- virtual SkFontStyleSet* onMatchFamily(const char[]) SK_OVERRIDE { |
+ virtual SkFontStyleSet* onMatchFamily(const char[]) const SK_OVERRIDE { |
return SkFontStyleSet::CreateEmpty(); |
} |
virtual SkTypeface* onMatchFamilyStyle(const char[], |
- const SkFontStyle&) SK_OVERRIDE { |
+ const SkFontStyle&) const SK_OVERRIDE { |
return NULL; |
} |
virtual SkTypeface* onMatchFaceStyle(const SkTypeface*, |
- const SkFontStyle&) SK_OVERRIDE { |
+ const SkFontStyle&) const SK_OVERRIDE { |
return NULL; |
} |
- virtual SkTypeface* onCreateFromData(SkData*, int) SK_OVERRIDE { |
+ virtual SkTypeface* onCreateFromData(SkData*, int) const SK_OVERRIDE { |
return NULL; |
} |
- virtual SkTypeface* onCreateFromStream(SkStream*, int) SK_OVERRIDE { |
+ virtual SkTypeface* onCreateFromStream(SkStream*, int) const SK_OVERRIDE { |
return NULL; |
} |
- virtual SkTypeface* onCreateFromFile(const char[], int) SK_OVERRIDE { |
+ virtual SkTypeface* onCreateFromFile(const char[], int) const SK_OVERRIDE { |
return NULL; |
} |
- virtual SkTypeface* onLegacyCreateTypeface(const char [], unsigned) SK_OVERRIDE { |
+ virtual SkTypeface* onLegacyCreateTypeface(const char [], unsigned) const SK_OVERRIDE { |
return NULL; |
} |
}; |
@@ -135,47 +135,47 @@ static SkFontStyleSet* emptyOnNull(SkFontStyleSet* fsset) { |
return fsset; |
} |
-int SkFontMgr::countFamilies() { |
+int SkFontMgr::countFamilies() const { |
return this->onCountFamilies(); |
} |
-void SkFontMgr::getFamilyName(int index, SkString* familyName) { |
+void SkFontMgr::getFamilyName(int index, SkString* familyName) const { |
this->onGetFamilyName(index, familyName); |
} |
-SkFontStyleSet* SkFontMgr::createStyleSet(int index) { |
+SkFontStyleSet* SkFontMgr::createStyleSet(int index) const { |
return emptyOnNull(this->onCreateStyleSet(index)); |
} |
-SkFontStyleSet* SkFontMgr::matchFamily(const char familyName[]) { |
+SkFontStyleSet* SkFontMgr::matchFamily(const char familyName[]) const { |
return emptyOnNull(this->onMatchFamily(familyName)); |
} |
SkTypeface* SkFontMgr::matchFamilyStyle(const char familyName[], |
- const SkFontStyle& fs) { |
+ const SkFontStyle& fs) const { |
return this->onMatchFamilyStyle(familyName, fs); |
} |
SkTypeface* SkFontMgr::matchFaceStyle(const SkTypeface* face, |
- const SkFontStyle& fs) { |
+ const SkFontStyle& fs) const { |
return this->onMatchFaceStyle(face, fs); |
} |
-SkTypeface* SkFontMgr::createFromData(SkData* data, int ttcIndex) { |
+SkTypeface* SkFontMgr::createFromData(SkData* data, int ttcIndex) const { |
if (NULL == data) { |
return NULL; |
} |
return this->onCreateFromData(data, ttcIndex); |
} |
-SkTypeface* SkFontMgr::createFromStream(SkStream* stream, int ttcIndex) { |
+SkTypeface* SkFontMgr::createFromStream(SkStream* stream, int ttcIndex) const { |
if (NULL == stream) { |
return NULL; |
} |
return this->onCreateFromStream(stream, ttcIndex); |
} |
-SkTypeface* SkFontMgr::createFromFile(const char path[], int ttcIndex) { |
+SkTypeface* SkFontMgr::createFromFile(const char path[], int ttcIndex) const { |
if (NULL == path) { |
return NULL; |
} |
@@ -183,7 +183,7 @@ SkTypeface* SkFontMgr::createFromFile(const char path[], int ttcIndex) { |
} |
SkTypeface* SkFontMgr::legacyCreateTypeface(const char familyName[], |
- unsigned styleBits) { |
+ unsigned styleBits) const { |
return this->onLegacyCreateTypeface(familyName, styleBits); |
} |