| 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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 | 104 |
| 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) override; |
| 115 SkStreamAsset* openStream(const FontIdentity&) SK_OVERRIDE; | 115 SkStreamAsset* openStream(const FontIdentity&) override; |
| 116 | 116 |
| 117 // new APIs | 117 // new APIs |
| 118 SkDataTable* getFamilyNames() SK_OVERRIDE; | 118 SkDataTable* getFamilyNames() 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>*) 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); |
| 129 static SkFontConfigInterfaceDirect* singleton = NULL; | 129 static SkFontConfigInterfaceDirect* singleton = NULL; |
| 130 if (singleton == NULL) { | 130 if (singleton == NULL) { |
| 131 singleton = SkNEW(SkFontConfigInterfaceDirect); | 131 singleton = SkNEW(SkFontConfigInterfaceDirect); |
| (...skipping 594 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 |