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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 SkAutoTUnref<SkFontMgr> fImpl; | 63 SkAutoTUnref<SkFontMgr> fImpl; |
64 SkAutoTUnref<SkRemotableFontMgr> fProxy; | 64 SkAutoTUnref<SkRemotableFontMgr> fProxy; |
65 | 65 |
66 struct DataEntry { | 66 struct DataEntry { |
67 uint32_t fDataId; // key1 | 67 uint32_t fDataId; // key1 |
68 uint32_t fTtcIndex; // key2 | 68 uint32_t fTtcIndex; // key2 |
69 SkTypeface* fTypeface; // value: weak ref to typeface | 69 SkTypeface* fTypeface; // value: weak ref to typeface |
70 | 70 |
71 DataEntry() { } | 71 DataEntry() { } |
72 | 72 |
73 // This is a move!!! | 73 DataEntry(DataEntry&& that) |
74 DataEntry(DataEntry& that) | |
75 : fDataId(that.fDataId) | 74 : fDataId(that.fDataId) |
76 , fTtcIndex(that.fTtcIndex) | 75 , fTtcIndex(that.fTtcIndex) |
77 , fTypeface(that.fTypeface) | 76 , fTypeface(that.fTypeface) |
78 { | 77 { |
79 SkDEBUGCODE(that.fDataId = SkFontIdentity::kInvalidDataId;) | 78 SkDEBUGCODE(that.fDataId = SkFontIdentity::kInvalidDataId;) |
80 SkDEBUGCODE(that.fTtcIndex = 0xbbadbeef;) | 79 SkDEBUGCODE(that.fTtcIndex = 0xbbadbeef;) |
81 that.fTypeface = NULL; | 80 that.fTypeface = NULL; |
82 } | 81 } |
83 | 82 |
84 ~DataEntry() { | 83 ~DataEntry() { |
(...skipping 13 matching lines...) Expand all Loading... |
98 | 97 |
99 mutable SkAutoTUnref<SkDataTable> fFamilyNames; | 98 mutable SkAutoTUnref<SkDataTable> fFamilyNames; |
100 mutable bool fFamilyNamesInited; | 99 mutable bool fFamilyNamesInited; |
101 mutable SkMutex fFamilyNamesMutex; | 100 mutable SkMutex fFamilyNamesMutex; |
102 static void set_up_family_names(const SkFontMgr_Indirect* self); | 101 static void set_up_family_names(const SkFontMgr_Indirect* self); |
103 | 102 |
104 friend class SkStyleSet_Indirect; | 103 friend class SkStyleSet_Indirect; |
105 }; | 104 }; |
106 | 105 |
107 #endif | 106 #endif |
OLD | NEW |