| 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 DataEntry(DataEntry&& that) | 73 // This is a move!!! |
| 74 DataEntry(DataEntry& that) |
| 74 : fDataId(that.fDataId) | 75 : fDataId(that.fDataId) |
| 75 , fTtcIndex(that.fTtcIndex) | 76 , fTtcIndex(that.fTtcIndex) |
| 76 , fTypeface(that.fTypeface) | 77 , fTypeface(that.fTypeface) |
| 77 { | 78 { |
| 78 SkDEBUGCODE(that.fDataId = SkFontIdentity::kInvalidDataId;) | 79 SkDEBUGCODE(that.fDataId = SkFontIdentity::kInvalidDataId;) |
| 79 SkDEBUGCODE(that.fTtcIndex = 0xbbadbeef;) | 80 SkDEBUGCODE(that.fTtcIndex = 0xbbadbeef;) |
| 80 that.fTypeface = NULL; | 81 that.fTypeface = NULL; |
| 81 } | 82 } |
| 82 | 83 |
| 83 ~DataEntry() { | 84 ~DataEntry() { |
| (...skipping 13 matching lines...) Expand all Loading... |
| 97 | 98 |
| 98 mutable SkAutoTUnref<SkDataTable> fFamilyNames; | 99 mutable SkAutoTUnref<SkDataTable> fFamilyNames; |
| 99 mutable bool fFamilyNamesInited; | 100 mutable bool fFamilyNamesInited; |
| 100 mutable SkMutex fFamilyNamesMutex; | 101 mutable SkMutex fFamilyNamesMutex; |
| 101 static void set_up_family_names(const SkFontMgr_Indirect* self); | 102 static void set_up_family_names(const SkFontMgr_Indirect* self); |
| 102 | 103 |
| 103 friend class SkStyleSet_Indirect; | 104 friend class SkStyleSet_Indirect; |
| 104 }; | 105 }; |
| 105 | 106 |
| 106 #endif | 107 #endif |
| OLD | NEW |