| 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 <string> |   10 #include <string> | 
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  117     // new APIs |  117     // new APIs | 
|  118     virtual SkDataTable* getFamilyNames() SK_OVERRIDE; |  118     virtual 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 namespace { |  | 
|  128 SkFontConfigInterface* create_direct() { return SkNEW(SkFontConfigInterfaceDirec
     t); } |  | 
|  129 } // namespace |  | 
|  130  |  | 
|  131 SkFontConfigInterface* SkFontConfigInterface::GetSingletonDirectInterface() { |  127 SkFontConfigInterface* SkFontConfigInterface::GetSingletonDirectInterface() { | 
|  132     SK_DECLARE_STATIC_LAZY_PTR(SkFontConfigInterface, direct, create_direct); |  128     SK_DECLARE_STATIC_LAZY_PTR(SkFontConfigInterfaceDirect, direct); | 
|  133     return direct.get(); |  129     return direct.get(); | 
|  134 } |  130 } | 
|  135  |  131  | 
|  136 /////////////////////////////////////////////////////////////////////////////// |  132 /////////////////////////////////////////////////////////////////////////////// | 
|  137  |  133  | 
|  138 // Returns the string from the pattern, or NULL |  134 // Returns the string from the pattern, or NULL | 
|  139 static const char* get_name(FcPattern* pattern, const char field[], |  135 static const char* get_name(FcPattern* pattern, const char field[], | 
|  140                             int index = 0) { |  136                             int index = 0) { | 
|  141     const char* name; |  137     const char* name; | 
|  142     if (FcPatternGetString(pattern, field, index, |  138     if (FcPatternGetString(pattern, field, index, | 
| (...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  724                 *trimmedMatches.append() = match[i]; |  720                 *trimmedMatches.append() = match[i]; | 
|  725             } |  721             } | 
|  726         } |  722         } | 
|  727  |  723  | 
|  728         SkFontStyleSet_FC* sset = SkNEW_ARGS(SkFontStyleSet_FC, |  724         SkFontStyleSet_FC* sset = SkNEW_ARGS(SkFontStyleSet_FC, | 
|  729                                              (trimmedMatches.begin(), |  725                                              (trimmedMatches.begin(), | 
|  730                                               trimmedMatches.count())); |  726                                               trimmedMatches.count())); | 
|  731 #endif |  727 #endif | 
|  732     return false; |  728     return false; | 
|  733 } |  729 } | 
| OLD | NEW |