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

Unified Diff: src/ports/SkFontHost_mac.cpp

Issue 692553002: Add a flag indicating locally-created fonts to SkCreateTypefaceFromCTFont (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: just add isLocal flag to SkCreateTypefaceFromCTFont Created 6 years, 2 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 | « include/ports/SkTypeface_mac.h ('k') | no next file » | 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 a63152817a684e702aaec932d7627ceece2804b7..a24e089f986916de025f6c8512297fb476c1b52f 100755
--- a/src/ports/SkFontHost_mac.cpp
+++ b/src/ports/SkFontHost_mac.cpp
@@ -569,13 +569,13 @@ CTFontRef SkTypeface_GetCTFontRef(const SkTypeface* face) {
/* This function is visible on the outside. It first searches the cache, and if
* not found, returns a new entry (after adding it to the cache).
*/
-SkTypeface* SkCreateTypefaceFromCTFont(CTFontRef fontRef) {
+SkTypeface* SkCreateTypefaceFromCTFont(CTFontRef fontRef, bool isLocalStream) {
SkFontID fontID = CTFontRef_to_SkFontID(fontRef);
SkTypeface* face = SkTypefaceCache::FindByID(fontID);
if (face) {
face->ref();
} else {
- face = NewFromFontRef(fontRef, NULL, false);
+ face = NewFromFontRef(fontRef, NULL, isLocalStream);
SkTypefaceCache::Add(face, face->fontStyle());
// NewFromFontRef doesn't retain the parameter, but the typeface it
// creates does release it in its destructor, so we balance that with
« no previous file with comments | « include/ports/SkTypeface_mac.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698