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

Side by Side Diff: src/core/SkTypefaceCache.cpp

Issue 1215393002: Remove SkThread.h, include SkMutex.h or SkAtomics.h as appropriate. (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: skimagefilter Created 5 years, 5 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 unified diff | Download patch
« no previous file with comments | « src/core/SkTypeface.cpp ('k') | src/fonts/SkFontMgr_fontconfig.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 10
11 #include "SkTypefaceCache.h" 11 #include "SkTypefaceCache.h"
12 #include "SkThread.h" 12 #include "SkAtomics.h"
13 #include "SkMutex.h"
13 14
14 #define TYPEFACE_CACHE_LIMIT 1024 15 #define TYPEFACE_CACHE_LIMIT 1024
15 16
16 SkTypefaceCache::SkTypefaceCache() {} 17 SkTypefaceCache::SkTypefaceCache() {}
17 18
18 SkTypefaceCache::~SkTypefaceCache() { 19 SkTypefaceCache::~SkTypefaceCache() {
19 const Rec* curr = fArray.begin(); 20 const Rec* curr = fArray.begin();
20 const Rec* stop = fArray.end(); 21 const Rec* stop = fArray.end();
21 while (curr < stop) { 22 while (curr < stop) {
22 curr->fFace->unref(); 23 curr->fFace->unref();
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 return false; 109 return false;
109 } 110 }
110 #endif 111 #endif
111 112
112 void SkTypefaceCache::Dump() { 113 void SkTypefaceCache::Dump() {
113 #ifdef SK_DEBUG 114 #ifdef SK_DEBUG
114 SkAutoMutexAcquire ama(gMutex); 115 SkAutoMutexAcquire ama(gMutex);
115 (void)Get().findByProcAndRef(DumpProc, NULL); 116 (void)Get().findByProcAndRef(DumpProc, NULL);
116 #endif 117 #endif
117 } 118 }
OLDNEW
« no previous file with comments | « src/core/SkTypeface.cpp ('k') | src/fonts/SkFontMgr_fontconfig.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698