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

Side by Side Diff: src/gpu/GrTextStrike.h

Issue 286803002: Allow GrFontCache::dump() in all builds (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 7 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 | « no previous file | src/gpu/GrTextStrike.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 /* 2 /*
3 * Copyright 2010 Google Inc. 3 * Copyright 2010 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 10
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 return fCache.getArray()[index]; 89 return fCache.getArray()[index];
90 } 90 }
91 GrTextStrike* getHeadStrike() const { return fHead; } 91 GrTextStrike* getHeadStrike() const { return fHead; }
92 92
93 #ifdef SK_DEBUG 93 #ifdef SK_DEBUG
94 void validate() const; 94 void validate() const;
95 #else 95 #else
96 void validate() const {} 96 void validate() const {}
97 #endif 97 #endif
98 98
99 #ifdef SK_DEVELOPER
100 void dump() const; 99 void dump() const;
101 #endif
102 100
103 enum AtlasType { 101 enum AtlasType {
104 kA8_AtlasType, //!< 1-byte per pixel 102 kA8_AtlasType, //!< 1-byte per pixel
105 k565_AtlasType, //!< 2-bytes per pixel 103 k565_AtlasType, //!< 2-bytes per pixel
106 k8888_AtlasType, //!< 4-bytes per pixel 104 k8888_AtlasType, //!< 4-bytes per pixel
107 105
108 kLast_AtlasType = k8888_AtlasType 106 kLast_AtlasType = k8888_AtlasType
109 }; 107 };
110 static const int kAtlasCount = kLast_AtlasType + 1; 108 static const int kAtlasCount = kLast_AtlasType + 1;
111 109
112 private: 110 private:
113 friend class GrFontPurgeListener; 111 friend class GrFontPurgeListener;
114 112
115 class Key; 113 class Key;
116 GrTHashTable<GrTextStrike, Key, 8> fCache; 114 GrTHashTable<GrTextStrike, Key, 8> fCache;
117 // for LRU 115 // for LRU
118 GrTextStrike* fHead; 116 GrTextStrike* fHead;
119 GrTextStrike* fTail; 117 GrTextStrike* fTail;
120 118
121 GrGpu* fGpu; 119 GrGpu* fGpu;
122 GrAtlasMgr* fAtlasMgr[kAtlasCount]; 120 GrAtlasMgr* fAtlasMgr[kAtlasCount];
123 121
124 GrTextStrike* generateStrike(GrFontScaler*, const Key&); 122 GrTextStrike* generateStrike(GrFontScaler*, const Key&);
125 inline void detachStrikeFromList(GrTextStrike*); 123 inline void detachStrikeFromList(GrTextStrike*);
126 void purgeStrike(GrTextStrike* strike); 124 void purgeStrike(GrTextStrike* strike);
127 }; 125 };
128 126
129 #endif 127 #endif
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrTextStrike.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698