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

Unified Diff: src/ports/SkFontHost_linux.cpp

Issue 134643028: Make SkFontMgr interface const. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: dw fixes Created 6 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/fonts/SkFontMgr_fontconfig.cpp ('k') | src/ports/SkFontHost_mac.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 9eabac31c6a06c3beb4de898905abcd6bf11abe9..2f962d7d40d35e1cc6854eb2c065859e69a9eaff 100644
--- a/src/ports/SkFontHost_linux.cpp
+++ b/src/ports/SkFontHost_linux.cpp
@@ -215,21 +215,21 @@ public:
}
protected:
- virtual int onCountFamilies() SK_OVERRIDE {
+ virtual int onCountFamilies() const SK_OVERRIDE {
return fFamilies.count();
}
- virtual void onGetFamilyName(int index, SkString* familyName) SK_OVERRIDE {
+ virtual void onGetFamilyName(int index, SkString* familyName) const SK_OVERRIDE {
SkASSERT(index < fFamilies.count());
familyName->set(fFamilies[index]->fFamilyName);
}
- virtual SkFontStyleSet_Custom* onCreateStyleSet(int index) SK_OVERRIDE {
+ virtual SkFontStyleSet_Custom* onCreateStyleSet(int index) const SK_OVERRIDE {
SkASSERT(index < fFamilies.count());
return SkRef(fFamilies[index].get());
}
- virtual SkFontStyleSet_Custom* onMatchFamily(const char familyName[]) SK_OVERRIDE {
+ virtual SkFontStyleSet_Custom* onMatchFamily(const char familyName[]) const SK_OVERRIDE {
for (int i = 0; i < fFamilies.count(); ++i) {
if (fFamilies[i]->fFamilyName.equals(familyName)) {
return SkRef(fFamilies[i].get());
@@ -239,14 +239,14 @@ protected:
}
virtual SkTypeface* onMatchFamilyStyle(const char familyName[],
- const SkFontStyle& fontStyle) SK_OVERRIDE
+ const SkFontStyle& fontStyle) const SK_OVERRIDE
{
SkAutoTUnref<SkFontStyleSet> sset(this->matchFamily(familyName));
return sset->matchStyle(fontStyle);
}
virtual SkTypeface* onMatchFaceStyle(const SkTypeface* familyMember,
- const SkFontStyle& fontStyle) SK_OVERRIDE
+ const SkFontStyle& fontStyle) const SK_OVERRIDE
{
for (int i = 0; i < fFamilies.count(); ++i) {
for (int j = 0; j < fFamilies[i]->fStyles.count(); ++j) {
@@ -258,12 +258,12 @@ protected:
return NULL;
}
- virtual SkTypeface* onCreateFromData(SkData* data, int ttcIndex) SK_OVERRIDE {
+ virtual SkTypeface* onCreateFromData(SkData* data, int ttcIndex) const SK_OVERRIDE {
SkAutoTUnref<SkStream> stream(new SkMemoryStream(data));
return this->createFromStream(stream, ttcIndex);
}
- virtual SkTypeface* onCreateFromStream(SkStream* stream, int ttcIndex) SK_OVERRIDE {
+ virtual SkTypeface* onCreateFromStream(SkStream* stream, int ttcIndex) const SK_OVERRIDE {
if (NULL == stream || stream->getLength() <= 0) {
SkDELETE(stream);
return NULL;
@@ -279,13 +279,13 @@ protected:
}
}
- virtual SkTypeface* onCreateFromFile(const char path[], int ttcIndex) SK_OVERRIDE {
+ virtual SkTypeface* onCreateFromFile(const char path[], int ttcIndex) const SK_OVERRIDE {
SkAutoTUnref<SkStream> stream(SkStream::NewFromFile(path));
return stream.get() ? this->createFromStream(stream, ttcIndex) : NULL;
}
virtual SkTypeface* onLegacyCreateTypeface(const char familyName[],
- unsigned styleBits) SK_OVERRIDE
+ unsigned styleBits) const SK_OVERRIDE
{
SkTypeface::Style oldStyle = (SkTypeface::Style)styleBits;
SkFontStyle style = SkFontStyle(oldStyle & SkTypeface::kBold
« no previous file with comments | « src/fonts/SkFontMgr_fontconfig.cpp ('k') | src/ports/SkFontHost_mac.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698