| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2008 Google Inc. | 2 * Copyright 2008 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 "SkFontConfigInterface.h" | 8 #include "SkFontConfigInterface.h" |
| 9 #include "SkFontConfigTypeface.h" | 9 #include "SkFontConfigTypeface.h" |
| 10 #include "SkFontDescriptor.h" | 10 #include "SkFontDescriptor.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 | 43 |
| 44 // convenience function to create the direct interface if none is installed. | 44 // convenience function to create the direct interface if none is installed. |
| 45 extern SkFontConfigInterface* SkCreateDirectFontConfigInterface(); | 45 extern SkFontConfigInterface* SkCreateDirectFontConfigInterface(); |
| 46 | 46 |
| 47 static SkFontConfigInterface* RefFCI() { | 47 static SkFontConfigInterface* RefFCI() { |
| 48 for (;;) { | 48 for (;;) { |
| 49 SkFontConfigInterface* fci = SkFontConfigInterface::RefGlobal(); | 49 SkFontConfigInterface* fci = SkFontConfigInterface::RefGlobal(); |
| 50 if (fci) { | 50 if (fci) { |
| 51 return fci; | 51 return fci; |
| 52 } | 52 } |
| 53 fci = SkFontConfigInterface::GetSingletonDirectInterface(); | 53 fci = SkFontConfigInterface::GetSingletonDirectInterface(&gFontConfigInt
erfaceMutex); |
| 54 SkFontConfigInterface::SetGlobal(fci); | 54 SkFontConfigInterface::SetGlobal(fci); |
| 55 } | 55 } |
| 56 } | 56 } |
| 57 | 57 |
| 58 // export this to SkFontMgr_fontconfig.cpp until this file just goes away. | 58 // export this to SkFontMgr_fontconfig.cpp until this file just goes away. |
| 59 SkFontConfigInterface* SkFontHost_fontconfig_ref_global(); | 59 SkFontConfigInterface* SkFontHost_fontconfig_ref_global(); |
| 60 SkFontConfigInterface* SkFontHost_fontconfig_ref_global() { | 60 SkFontConfigInterface* SkFontHost_fontconfig_ref_global() { |
| 61 return RefFCI(); | 61 return RefFCI(); |
| 62 } | 62 } |
| 63 | 63 |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 *ttcIndex = this->getIdentity().fTTCIndex; | 203 *ttcIndex = this->getIdentity().fTTCIndex; |
| 204 } | 204 } |
| 205 return stream; | 205 return stream; |
| 206 } | 206 } |
| 207 | 207 |
| 208 void FontConfigTypeface::onGetFontDescriptor(SkFontDescriptor* desc, | 208 void FontConfigTypeface::onGetFontDescriptor(SkFontDescriptor* desc, |
| 209 bool* isLocalStream) const { | 209 bool* isLocalStream) const { |
| 210 desc->setFamilyName(this->getFamilyName()); | 210 desc->setFamilyName(this->getFamilyName()); |
| 211 *isLocalStream = SkToBool(this->getLocalStream()); | 211 *isLocalStream = SkToBool(this->getLocalStream()); |
| 212 } | 212 } |
| OLD | NEW |