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

Unified Diff: src/core/SkTypefaceCache.cpp

Issue 1125763002: Fix typeface ids on Mac. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Remove some leaks, maybe some races. Created 5 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/core/SkTypefaceCache.h ('k') | src/ports/SkFontHost_mac.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 8adffe6a3a5cc6fa7c90ea8139cc1ab2d1537d3e..f253b60523b40ad9e79ffd4195d12285abe1e998 100644
--- a/src/core/SkTypefaceCache.cpp
+++ b/src/core/SkTypefaceCache.cpp
@@ -34,18 +34,6 @@ void SkTypefaceCache::add(SkTypeface* face, const SkFontStyle& requestedStyle) {
rec->fRequestedStyle = requestedStyle;
}
-SkTypeface* SkTypefaceCache::findByID(SkFontID fontID) const {
- const Rec* curr = fArray.begin();
- const Rec* stop = fArray.end();
- while (curr < stop) {
- if (curr->fFace->uniqueID() == fontID) {
- return curr->fFace;
- }
- curr += 1;
- }
- return NULL;
-}
-
SkTypeface* SkTypefaceCache::findByProcAndRef(FindProc proc, void* ctx) const {
const Rec* curr = fArray.begin();
const Rec* stop = fArray.end();
@@ -100,11 +88,6 @@ void SkTypefaceCache::Add(SkTypeface* face, const SkFontStyle& requestedStyle) {
Get().add(face, requestedStyle);
}
-SkTypeface* SkTypefaceCache::FindByID(SkFontID fontID) {
- SkAutoMutexAcquire ama(gMutex);
- return Get().findByID(fontID);
-}
-
SkTypeface* SkTypefaceCache::FindByProcAndRef(FindProc proc, void* ctx) {
SkAutoMutexAcquire ama(gMutex);
SkTypeface* typeface = Get().findByProcAndRef(proc, ctx);
« no previous file with comments | « src/core/SkTypefaceCache.h ('k') | src/ports/SkFontHost_mac.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698