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

Unified Diff: src/core/SkTypefaceCache.h

Issue 488143002: Replace SkTypeface::Style with SkFontStyle. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add expectations, remove whitespace. 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 | « src/core/SkTypeface.cpp ('k') | src/core/SkTypefaceCache.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkTypefaceCache.h
diff --git a/src/core/SkTypefaceCache.h b/src/core/SkTypefaceCache.h
index ae37ab76ec4ba6cfd4984087606eb78f40030f08..ba851ee0b6a4b2dc45c7fca456e56c0a862796ce 100644
--- a/src/core/SkTypefaceCache.h
+++ b/src/core/SkTypefaceCache.h
@@ -31,7 +31,7 @@ public:
* for the given context. The passed typeface is owned by the cache and is
* not additionally ref()ed. The typeface may be in the disposed state.
*/
- typedef bool (*FindProc)(SkTypeface*, SkTypeface::Style, void* context);
+ typedef bool(*FindProc)(SkTypeface*, const SkFontStyle&, void* context);
/**
* Add a typeface to the cache. This ref()s the typeface, so that the
@@ -39,7 +39,7 @@ public:
* whose refcnt is 1 (meaning only the cache is an owner) will be
* unref()ed.
*/
- void add(SkTypeface*, SkTypeface::Style requested, bool strong = true);
+ void add(SkTypeface*, const SkFontStyle& requested, bool strong = true);
/**
* Search the cache for a typeface with the specified fontID (uniqueID).
@@ -73,7 +73,7 @@ public:
// These are static wrappers around a global instance of a cache.
static void Add(SkTypeface*,
- SkTypeface::Style requested,
+ const SkFontStyle& requested,
bool strong = true);
static SkTypeface* FindByID(SkFontID fontID);
static SkTypeface* FindByProcAndRef(FindProc proc, void* ctx);
@@ -90,9 +90,9 @@ private:
void purge(int count);
struct Rec {
- SkTypeface* fFace;
- bool fStrong;
- SkTypeface::Style fRequestedStyle;
+ SkTypeface* fFace;
+ bool fStrong;
+ SkFontStyle fRequestedStyle;
};
SkTDArray<Rec> fArray;
};
« no previous file with comments | « src/core/SkTypeface.cpp ('k') | src/core/SkTypefaceCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698