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

Unified Diff: src/ports/SkFontHost_win.cpp

Issue 1879423002: Remove requestedStyle from SkTypefaceCache. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: More interesting coverage. Created 4 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/ports/SkFontHost_mac.cpp ('k') | src/ports/SkFontMgr_fontconfig.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 c9781ba23af4e3f0ee18603029c63b5dac3cf9f6..5ded39c1b42406066697e614ca853fe6087dd5d1 100644
--- a/src/ports/SkFontHost_win.cpp
+++ b/src/ports/SkFontHost_win.cpp
@@ -308,13 +308,11 @@ static const LOGFONT& get_default_font() {
return gDefaultFont;
}
-static bool FindByLogFont(SkTypeface* face, const SkFontStyle& requestedStyle, void* ctx) {
+static bool FindByLogFont(SkTypeface* face, void* ctx) {
LogFontTypeface* lface = static_cast<LogFontTypeface*>(face);
const LOGFONT* lf = reinterpret_cast<const LOGFONT*>(ctx);
- return lface &&
- get_style(lface->fLogFont) == requestedStyle &&
- !memcmp(&lface->fLogFont, lf, sizeof(LOGFONT));
+ return !memcmp(&lface->fLogFont, lf, sizeof(LOGFONT));
}
/**
@@ -327,7 +325,7 @@ SkTypeface* SkCreateTypefaceFromLOGFONT(const LOGFONT& origLF) {
SkTypeface* face = SkTypefaceCache::FindByProcAndRef(FindByLogFont, &lf);
if (nullptr == face) {
face = LogFontTypeface::Create(lf);
- SkTypefaceCache::Add(face, get_style(lf));
+ SkTypefaceCache::Add(face);
}
return face;
}
« no previous file with comments | « src/ports/SkFontHost_mac.cpp ('k') | src/ports/SkFontMgr_fontconfig.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698