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

Unified Diff: src/ports/SkFontHost_mac.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_fontconfig.cpp ('k') | src/ports/SkFontHost_win.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ports/SkFontHost_mac.cpp
diff --git a/src/ports/SkFontHost_mac.cpp b/src/ports/SkFontHost_mac.cpp
index 049d08b6fc4cd44dced34786c931cb2f7ce57034..02c54640bbed585f9e345a34d41b15cb6eb3b4b2 100644
--- a/src/ports/SkFontHost_mac.cpp
+++ b/src/ports/SkFontHost_mac.cpp
@@ -486,7 +486,7 @@ static SkTypeface* NewFromFontRef(CTFontRef fontRef, CFTypeRef resourceRef, bool
return new SkTypeface_Mac(fontRef, resourceRef, style, isFixedPitch, isLocalStream);
}
-static bool find_by_CTFontRef(SkTypeface* cached, const SkFontStyle&, void* context) {
+static bool find_by_CTFontRef(SkTypeface* cached, void* context) {
CTFontRef self = (CTFontRef)context;
CTFontRef other = ((SkTypeface_Mac*)cached)->fFontRef;
@@ -546,7 +546,7 @@ static SkTypeface* NewFromName(const char familyName[], const SkFontStyle& theSt
return face;
}
face = NewFromFontRef(ctFont.release(), nullptr, false);
- SkTypefaceCache::Add(face, face->fontStyle());
+ SkTypefaceCache::Add(face);
return face;
}
@@ -583,7 +583,7 @@ SkTypeface* SkCreateTypefaceFromCTFont(CTFontRef fontRef, CFTypeRef resourceRef)
CFRetain(resourceRef);
}
face = NewFromFontRef(fontRef, resourceRef, false);
- SkTypefaceCache::Add(face, face->fontStyle());
+ SkTypefaceCache::Add(face);
return face;
}
@@ -2166,7 +2166,7 @@ static SkTypeface* createFromDesc(CTFontDescriptorRef desc) {
}
face = NewFromFontRef(ctFont.release(), nullptr, false);
- SkTypefaceCache::Add(face, face->fontStyle());
+ SkTypefaceCache::Add(face);
return face;
}
« no previous file with comments | « src/ports/SkFontHost_fontconfig.cpp ('k') | src/ports/SkFontHost_win.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698