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

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

Issue 1672063002: SkTArray to move when moving. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Disable bad language extensions, fix existing code. 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') | src/ports/SkRemotableFontMgr_win_dw.cpp » ('j') | 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 // 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
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
OLDNEW
« no previous file with comments | « include/core/SkTArray.h ('k') | src/ports/SkRemotableFontMgr_win_dw.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698