aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkTypefaceCache.cpp
diff options
context:
space:
mode:
authorGravatar bungeman <bungeman@google.com>2014-10-20 12:33:59 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-10-20 12:33:59 -0700
commit43b8b36b20ae00e2d78421c4cda1f3f922983a20 (patch)
treedd61aeeafd3280074f03e7ef5b1a462bfd060c9e /src/core/SkTypefaceCache.cpp
parent33e6466a4faa3a58202bf056b50fdcd9dc34cc22 (diff)
Replace SkTypeface::Style with SkFontStyle.
Diffstat (limited to 'src/core/SkTypefaceCache.cpp')
-rw-r--r--src/core/SkTypefaceCache.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/core/SkTypefaceCache.cpp b/src/core/SkTypefaceCache.cpp
index f864e1c9dc..cfa301ef39 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