Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(777)

Side by Side Diff: include/ports/SkFontMgr_indirect.h

Issue 1683693002: Revert of SkTArray to move when moving. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « include/core/SkTArray.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « include/core/SkTArray.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698