| OLD | NEW | 
|---|
| 1 /* | 1 /* | 
| 2  * Copyright 2014 Google Inc. | 2  * Copyright 2014 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 SkFontMgr_indirect_DEFINED | 8 #ifndef SkFontMgr_indirect_DEFINED | 
| 9 #define SkFontMgr_indirect_DEFINED | 9 #define SkFontMgr_indirect_DEFINED | 
| 10 | 10 | 
| (...skipping 20 matching lines...) Expand all  Loading... | 
| 31         : fImpl(SkRef(impl)), fProxy(SkRef(proxy)), fFamilyNamesInited(false) | 31         : fImpl(SkRef(impl)), fProxy(SkRef(proxy)), fFamilyNamesInited(false) | 
| 32     { } | 32     { } | 
| 33 | 33 | 
| 34 protected: | 34 protected: | 
| 35     int onCountFamilies() const override; | 35     int onCountFamilies() const override; | 
| 36     void onGetFamilyName(int index, SkString* familyName) const override; | 36     void onGetFamilyName(int index, SkString* familyName) const override; | 
| 37     SkFontStyleSet* onCreateStyleSet(int index) const override; | 37     SkFontStyleSet* onCreateStyleSet(int index) const override; | 
| 38 | 38 | 
| 39     SkFontStyleSet* onMatchFamily(const char familyName[]) const override; | 39     SkFontStyleSet* onMatchFamily(const char familyName[]) const override; | 
| 40 | 40 | 
| 41     virtual SkTypeface* onMatchFamilyStyle(const char familyName[], | 41     SkTypeface* onMatchFamilyStyle(const char familyName[], | 
| 42                                            const SkFontStyle& fontStyle) const o
     verride; | 42                                    const SkFontStyle& fontStyle) const override; | 
| 43 | 43 | 
| 44     virtual SkTypeface* onMatchFamilyStyleCharacter(const char familyName[], | 44     SkTypeface* onMatchFamilyStyleCharacter(const char familyName[], | 
| 45                                                     const SkFontStyle&, | 45                                             const SkFontStyle&, | 
| 46                                                     const char* bcp47[], | 46                                             const char* bcp47[], | 
| 47                                                     int bcp47Count, | 47                                             int bcp47Count, | 
| 48                                                     SkUnichar character) const o
     verride; | 48                                             SkUnichar character) const override; | 
| 49 | 49 | 
| 50     virtual SkTypeface* onMatchFaceStyle(const SkTypeface* familyMember, | 50     SkTypeface* onMatchFaceStyle(const SkTypeface* familyMember, | 
| 51                                          const SkFontStyle& fontStyle) const ove
     rride; | 51                                  const SkFontStyle& fontStyle) const override; | 
| 52 | 52 | 
| 53     SkTypeface* onCreateFromStream(SkStreamAsset* stream, int ttcIndex) const ov
     erride; | 53     SkTypeface* onCreateFromStream(SkStreamAsset* stream, int ttcIndex) const ov
     erride; | 
| 54     SkTypeface* onCreateFromFile(const char path[], int ttcIndex) const override
     ; | 54     SkTypeface* onCreateFromFile(const char path[], int ttcIndex) const override
     ; | 
| 55     SkTypeface* onCreateFromData(SkData* data, int ttcIndex) const override; | 55     SkTypeface* onCreateFromData(SkData* data, int ttcIndex) const override; | 
| 56 | 56 | 
| 57     virtual SkTypeface* onLegacyCreateTypeface(const char familyName[], | 57 #ifdef SK_VERY_LEGACY_CREATE_TYPEFACE | 
| 58                                                unsigned styleBits) const overrid
     e; | 58     SkTypeface* onLegacyCreateTypeface(const char familyName[], unsigned styleBi
     ts) const override; | 
|  | 59 #else | 
|  | 60     SkTypeface* onLegacyCreateTypeface(const char familyName[], SkFontStyle) con
     st override; | 
|  | 61 #endif | 
| 59 | 62 | 
| 60 private: | 63 private: | 
| 61     SkTypeface* createTypefaceFromFontId(const SkFontIdentity& fontId) const; | 64     SkTypeface* createTypefaceFromFontId(const SkFontIdentity& fontId) const; | 
| 62 | 65 | 
| 63     SkAutoTUnref<SkFontMgr> fImpl; | 66     SkAutoTUnref<SkFontMgr> fImpl; | 
| 64     SkAutoTUnref<SkRemotableFontMgr> fProxy; | 67     SkAutoTUnref<SkRemotableFontMgr> fProxy; | 
| 65 | 68 | 
| 66     struct DataEntry { | 69     struct DataEntry { | 
| 67         uint32_t fDataId;  // key1 | 70         uint32_t fDataId;  // key1 | 
| 68         uint32_t fTtcIndex;  // key2 | 71         uint32_t fTtcIndex;  // key2 | 
| (...skipping 28 matching lines...) Expand all  Loading... | 
| 97 | 100 | 
| 98     mutable SkAutoTUnref<SkDataTable> fFamilyNames; | 101     mutable SkAutoTUnref<SkDataTable> fFamilyNames; | 
| 99     mutable bool fFamilyNamesInited; | 102     mutable bool fFamilyNamesInited; | 
| 100     mutable SkMutex fFamilyNamesMutex; | 103     mutable SkMutex fFamilyNamesMutex; | 
| 101     static void set_up_family_names(const SkFontMgr_Indirect* self); | 104     static void set_up_family_names(const SkFontMgr_Indirect* self); | 
| 102 | 105 | 
| 103     friend class SkStyleSet_Indirect; | 106     friend class SkStyleSet_Indirect; | 
| 104 }; | 107 }; | 
| 105 | 108 | 
| 106 #endif | 109 #endif | 
| OLD | NEW | 
|---|