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

Side by Side Diff: src/fonts/SkFontMgr_fontconfig.cpp

Issue 1214603003: Revert of Remove SkThread.h, include SkMutex.h or SkAtomics.h as appropriate. (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: 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/SkTypefaceCache.cpp ('k') | src/fonts/SkTestScalerContext.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 * Copyright 2013 Google Inc. 2 * Copyright 2013 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkFontMgr.h"
9 #include "SkFontStyle.h"
8 #include "SkFontConfigInterface.h" 10 #include "SkFontConfigInterface.h"
9 #include "SkFontConfigTypeface.h" 11 #include "SkFontConfigTypeface.h"
10 #include "SkFontMgr.h"
11 #include "SkFontStyle.h"
12 #include "SkMath.h" 12 #include "SkMath.h"
13 #include "SkMutex.h"
14 #include "SkString.h" 13 #include "SkString.h"
15 #include "SkTDArray.h" 14 #include "SkTDArray.h"
15 #include "SkThread.h"
16 16
17 // for now we pull these in directly. eventually we will solely rely on the 17 // for now we pull these in directly. eventually we will solely rely on the
18 // SkFontConfigInterface instance. 18 // SkFontConfigInterface instance.
19 #include <fontconfig/fontconfig.h> 19 #include <fontconfig/fontconfig.h>
20 #include <unistd.h> 20 #include <unistd.h>
21 21
22 namespace { 22 namespace {
23 23
24 // Fontconfig is not threadsafe before 2.10.91. Before that, we lock with a glo bal mutex. 24 // Fontconfig is not threadsafe before 2.10.91. Before that, we lock with a glo bal mutex.
25 // See skia:1497 for background. 25 // See skia:1497 for background.
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 unsigned styleBits) const override { 325 unsigned styleBits) const override {
326 FCLocker lock; 326 FCLocker lock;
327 return FontConfigTypeface::LegacyCreateTypeface(familyName, (SkTypeface: :Style)styleBits); 327 return FontConfigTypeface::LegacyCreateTypeface(familyName, (SkTypeface: :Style)styleBits);
328 } 328 }
329 }; 329 };
330 330
331 SkFontMgr* SkFontMgr::Factory() { 331 SkFontMgr* SkFontMgr::Factory() {
332 SkFontConfigInterface* fci = RefFCI(); 332 SkFontConfigInterface* fci = RefFCI();
333 return fci ? SkNEW_ARGS(SkFontMgr_fontconfig, (fci)) : NULL; 333 return fci ? SkNEW_ARGS(SkFontMgr_fontconfig, (fci)) : NULL;
334 } 334 }
OLDNEW
« no previous file with comments | « src/core/SkTypefaceCache.cpp ('k') | src/fonts/SkTestScalerContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698