OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2009 Google Inc. | 2 * Copyright 2009 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 /* migrated from chrome/src/skia/ext/SkFontHost_fontconfig_direct.cpp */ | 8 /* migrated from chrome/src/skia/ext/SkFontHost_fontconfig_direct.cpp */ |
9 | 9 |
10 #include <unistd.h> | 10 #include <unistd.h> |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 class SkFontConfigInterfaceDirect : public SkFontConfigInterface { | 105 class SkFontConfigInterfaceDirect : public SkFontConfigInterface { |
106 public: | 106 public: |
107 SkFontConfigInterfaceDirect(); | 107 SkFontConfigInterfaceDirect(); |
108 virtual ~SkFontConfigInterfaceDirect(); | 108 virtual ~SkFontConfigInterfaceDirect(); |
109 | 109 |
110 virtual bool matchFamilyName(const char familyName[], | 110 virtual bool matchFamilyName(const char familyName[], |
111 SkTypeface::Style requested, | 111 SkTypeface::Style requested, |
112 FontIdentity* outFontIdentifier, | 112 FontIdentity* outFontIdentifier, |
113 SkString* outFamilyName, | 113 SkString* outFamilyName, |
114 SkTypeface::Style* outStyle) SK_OVERRIDE; | 114 SkTypeface::Style* outStyle) SK_OVERRIDE; |
115 virtual SkStream* openStream(const FontIdentity&) SK_OVERRIDE; | 115 SkStream* openStream(const FontIdentity&) SK_OVERRIDE; |
116 | 116 |
117 // new APIs | 117 // new APIs |
118 virtual SkDataTable* getFamilyNames() SK_OVERRIDE; | 118 SkDataTable* getFamilyNames() SK_OVERRIDE; |
119 virtual bool matchFamilySet(const char inFamilyName[], | 119 virtual bool matchFamilySet(const char inFamilyName[], |
120 SkString* outFamilyName, | 120 SkString* outFamilyName, |
121 SkTArray<FontIdentity>*) SK_OVERRIDE; | 121 SkTArray<FontIdentity>*) SK_OVERRIDE; |
122 | 122 |
123 private: | 123 private: |
124 SkMutex mutex_; | 124 SkMutex mutex_; |
125 }; | 125 }; |
126 | 126 |
127 SkFontConfigInterface* SkFontConfigInterface::GetSingletonDirectInterface(SkBase
Mutex* mutex) { | 127 SkFontConfigInterface* SkFontConfigInterface::GetSingletonDirectInterface(SkBase
Mutex* mutex) { |
128 SkAutoMutexAcquire ac(mutex); | 128 SkAutoMutexAcquire ac(mutex); |
(...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
726 *trimmedMatches.append() = match[i]; | 726 *trimmedMatches.append() = match[i]; |
727 } | 727 } |
728 } | 728 } |
729 | 729 |
730 SkFontStyleSet_FC* sset = SkNEW_ARGS(SkFontStyleSet_FC, | 730 SkFontStyleSet_FC* sset = SkNEW_ARGS(SkFontStyleSet_FC, |
731 (trimmedMatches.begin(), | 731 (trimmedMatches.begin(), |
732 trimmedMatches.count())); | 732 trimmedMatches.count())); |
733 #endif | 733 #endif |
734 return false; | 734 return false; |
735 } | 735 } |
OLD | NEW |