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

Side by Side Diff: include/ports/SkFontConfigInterface.h

Issue 354133004: Revert of Fix race condition in parallel font initialization. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 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 | « no previous file | src/ports/SkFontConfigInterface_android.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 #ifndef SkFontConfigInterface_DEFINED 8 #ifndef SkFontConfigInterface_DEFINED
9 #define SkFontConfigInterface_DEFINED 9 #define SkFontConfigInterface_DEFINED
10 10
11 #include "SkDataTable.h" 11 #include "SkDataTable.h"
12 #include "SkFontStyle.h" 12 #include "SkFontStyle.h"
13 #include "SkRefCnt.h" 13 #include "SkRefCnt.h"
14 #include "SkTArray.h" 14 #include "SkTArray.h"
15 #include "SkTypeface.h" 15 #include "SkTypeface.h"
16 16
17 struct SkBaseMutex;
18
19 /** 17 /**
20 * \class SkFontConfigInterface 18 * \class SkFontConfigInterface
21 * 19 *
22 * Provides SkFontHost clients with access to fontconfig services. They will 20 * Provides SkFontHost clients with access to fontconfig services. They will
23 * access the global instance found in RefGlobal(). 21 * access the global instance found in RefGlobal().
24 */ 22 */
25 class SK_API SkFontConfigInterface : public SkRefCnt { 23 class SK_API SkFontConfigInterface : public SkRefCnt {
26 public: 24 public:
27 SK_DECLARE_INST_COUNT(SkFontConfigInterface) 25 SK_DECLARE_INST_COUNT(SkFontConfigInterface)
28 26
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 /** 88 /**
91 * Given a FontRef, open a stream to access its data, or return null 89 * Given a FontRef, open a stream to access its data, or return null
92 * if the FontRef's data is not available. The caller is responsible for 90 * if the FontRef's data is not available. The caller is responsible for
93 * calling stream->unref() when it is done accessing the data. 91 * calling stream->unref() when it is done accessing the data.
94 */ 92 */
95 virtual SkStream* openStream(const FontIdentity&) = 0; 93 virtual SkStream* openStream(const FontIdentity&) = 0;
96 94
97 /** 95 /**
98 * Return a singleton instance of a direct subclass that calls into 96 * Return a singleton instance of a direct subclass that calls into
99 * libfontconfig. This does not affect the refcnt of the returned instance. 97 * libfontconfig. This does not affect the refcnt of the returned instance.
100 * The mutex may be used to guarantee the singleton is only constructed onc e.
101 */ 98 */
102 static SkFontConfigInterface* GetSingletonDirectInterface(SkBaseMutex* mutex ); 99 static SkFontConfigInterface* GetSingletonDirectInterface();
103 100
104 // New APIS, which have default impls for now (which do nothing) 101 // New APIS, which have default impls for now (which do nothing)
105 102
106 virtual SkDataTable* getFamilyNames() { return SkDataTable::NewEmpty(); } 103 virtual SkDataTable* getFamilyNames() { return SkDataTable::NewEmpty(); }
107 virtual bool matchFamilySet(const char inFamilyName[], 104 virtual bool matchFamilySet(const char inFamilyName[],
108 SkString* outFamilyName, 105 SkString* outFamilyName,
109 SkTArray<FontIdentity>*) { 106 SkTArray<FontIdentity>*) {
110 return false; 107 return false;
111 } 108 }
112 typedef SkRefCnt INHERITED; 109 typedef SkRefCnt INHERITED;
113 }; 110 };
114 111
115 #endif 112 #endif
OLDNEW
« no previous file with comments | « no previous file | src/ports/SkFontConfigInterface_android.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698