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

Unified Diff: src/core/SkTypefaceCache.cpp

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/SkTypefaceCache.h ('k') | src/fonts/SkFontMgr_fontconfig.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkTypefaceCache.cpp
diff --git a/src/core/SkTypefaceCache.cpp b/src/core/SkTypefaceCache.cpp
index f864e1c9dc5105b4961eacd0253c48c7a18a67d8..cfa301ef39def299aa2abb801cec433daa3f2307 100644
--- a/src/core/SkTypefaceCache.cpp
+++ b/src/core/SkTypefaceCache.cpp
@@ -29,7 +29,7 @@ SkTypefaceCache::~SkTypefaceCache() {
}
void SkTypefaceCache::add(SkTypeface* face,
- SkTypeface::Style requestedStyle,
+ const SkFontStyle& requestedStyle,
bool strong) {
if (fArray.count() >= TYPEFACE_CACHE_LIMIT) {
this->purge(TYPEFACE_CACHE_LIMIT >> 2);
@@ -120,7 +120,7 @@ SkFontID SkTypefaceCache::NewFontID() {
SK_DECLARE_STATIC_MUTEX(gMutex);
void SkTypefaceCache::Add(SkTypeface* face,
- SkTypeface::Style requestedStyle,
+ const SkFontStyle& requestedStyle,
bool strong) {
SkAutoMutexAcquire ama(gMutex);
Get().add(face, requestedStyle, strong);
@@ -145,9 +145,9 @@ void SkTypefaceCache::PurgeAll() {
///////////////////////////////////////////////////////////////////////////////
#ifdef SK_DEBUG
-static bool DumpProc(SkTypeface* face, SkTypeface::Style style, void* ctx) {
- SkDebugf("SkTypefaceCache: face %p fontID %d style %d refcnt %d\n",
- face, face->uniqueID(), style, face->getRefCnt());
+static bool DumpProc(SkTypeface* face, const SkFontStyle& s, void* ctx) {
+ SkDebugf("SkTypefaceCache: face %p fontID %d weight %d width %d style %d refcnt %d\n",
+ face, face->uniqueID(), s.weight(), s.width(), s.slant(), face->getRefCnt());
return false;
}
#endif
« no previous file with comments | « src/core/SkTypefaceCache.h ('k') | src/fonts/SkFontMgr_fontconfig.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698