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

Unified Diff: src/ports/SkFontHost_win.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/ports/SkFontHost_mac.cpp ('k') | src/ports/SkFontHost_win_dw.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ports/SkFontHost_win.cpp
diff --git a/src/ports/SkFontHost_win.cpp b/src/ports/SkFontHost_win.cpp
index 9029c2b43dc198fe73b28fbb3a05130044e6b3d1..4ca0fb9181404e36c42318e095a8c8fdb081b4b1 100755
--- a/src/ports/SkFontHost_win.cpp
+++ b/src/ports/SkFontHost_win.cpp
@@ -2561,21 +2561,21 @@ public:
}
protected:
- virtual int onCountFamilies() SK_OVERRIDE {
+ virtual int onCountFamilies() const SK_OVERRIDE {
return fLogFontArray.count();
}
- virtual void onGetFamilyName(int index, SkString* familyName) SK_OVERRIDE {
+ virtual void onGetFamilyName(int index, SkString* familyName) const SK_OVERRIDE {
SkASSERT((unsigned)index < (unsigned)fLogFontArray.count());
tchar_to_skstring(fLogFontArray[index].elfLogFont.lfFaceName, familyName);
}
- virtual SkFontStyleSet* onCreateStyleSet(int index) SK_OVERRIDE {
+ virtual SkFontStyleSet* onCreateStyleSet(int index) const SK_OVERRIDE {
SkASSERT((unsigned)index < (unsigned)fLogFontArray.count());
return SkNEW_ARGS(SkFontStyleSetGDI, (fLogFontArray[index].elfLogFont.lfFaceName));
}
- virtual SkFontStyleSet* onMatchFamily(const char familyName[]) SK_OVERRIDE {
+ virtual SkFontStyleSet* onMatchFamily(const char familyName[]) const SK_OVERRIDE {
if (NULL == familyName) {
familyName = ""; // do we need this check???
}
@@ -2585,38 +2585,38 @@ protected:
}
virtual SkTypeface* onMatchFamilyStyle(const char familyName[],
- const SkFontStyle& fontstyle) SK_OVERRIDE {
+ const SkFontStyle& fontstyle) const SK_OVERRIDE {
// could be in base impl
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 {
// could be in base impl
SkString familyName;
((LogFontTypeface*)familyMember)->getFamilyName(&familyName);
return this->matchFamilyStyle(familyName.c_str(), fontstyle);
}
- virtual SkTypeface* onCreateFromStream(SkStream* stream, int ttcIndex) SK_OVERRIDE {
+ virtual SkTypeface* onCreateFromStream(SkStream* stream, int ttcIndex) const SK_OVERRIDE {
return create_from_stream(stream);
}
- virtual SkTypeface* onCreateFromData(SkData* data, int ttcIndex) SK_OVERRIDE {
+ virtual SkTypeface* onCreateFromData(SkData* data, int ttcIndex) const SK_OVERRIDE {
// could be in base impl
SkAutoTUnref<SkStream> stream(SkNEW_ARGS(SkMemoryStream, (data)));
return this->createFromStream(stream);
}
- virtual SkTypeface* onCreateFromFile(const char path[], int ttcIndex) SK_OVERRIDE {
+ virtual SkTypeface* onCreateFromFile(const char path[], int ttcIndex) const SK_OVERRIDE {
// could be in base impl
SkAutoTUnref<SkStream> stream(SkStream::NewFromFile(path));
return this->createFromStream(stream);
}
virtual SkTypeface* onLegacyCreateTypeface(const char familyName[],
- unsigned styleBits) SK_OVERRIDE {
+ unsigned styleBits) const SK_OVERRIDE {
LOGFONT lf;
if (NULL == familyName) {
lf = get_default_font();
« no previous file with comments | « src/ports/SkFontHost_mac.cpp ('k') | src/ports/SkFontHost_win_dw.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698