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

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

Issue 43383006: Clean up the GrTHashTable API. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: boo, default template arguments on a function are C++11... Created 7 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « src/gpu/GrTHashTable.h ('k') | 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 11 matching lines...) Expand all
22 class GrFontCache; 22 class GrFontCache;
23 class GrGpu; 23 class GrGpu;
24 class GrFontPurgeListener; 24 class GrFontPurgeListener;
25 25
26 /** 26 /**
27 * The textcache maps a hostfontscaler instance to a dictionary of 27 * The textcache maps a hostfontscaler instance to a dictionary of
28 * glyphid->strike 28 * glyphid->strike
29 */ 29 */
30 class GrTextStrike { 30 class GrTextStrike {
31 public: 31 public:
32 GrTextStrike(GrFontCache*, const GrKey* fontScalerKey, GrMaskFormat, 32 GrTextStrike(GrFontCache*, const GrKey* fontScalerKey, GrMaskFormat, GrAtlas Mgr*);
33 GrAtlasMgr*);
34 ~GrTextStrike(); 33 ~GrTextStrike();
35 34
36 const GrKey* getFontScalerKey() const { return fFontScalerKey; } 35 const GrKey* getFontScalerKey() const { return fFontScalerKey; }
37 GrFontCache* getFontCache() const { return fFontCache; } 36 GrFontCache* getFontCache() const { return fFontCache; }
38 GrMaskFormat getMaskFormat() const { return fMaskFormat; } 37 GrMaskFormat getMaskFormat() const { return fMaskFormat; }
39 38
40 inline GrGlyph* getGlyph(GrGlyph::PackedID, GrFontScaler*); 39 inline GrGlyph* getGlyph(GrGlyph::PackedID, GrFontScaler*);
41 bool getGlyphAtlas(GrGlyph*, GrFontScaler*); 40 bool getGlyphAtlas(GrGlyph*, GrFontScaler*);
42 41
43 // testing 42 // testing
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 GrTHashTable<GrTextStrike, Key, 8> fCache; 108 GrTHashTable<GrTextStrike, Key, 8> fCache;
110 // for LRU 109 // for LRU
111 GrTextStrike* fHead; 110 GrTextStrike* fHead;
112 GrTextStrike* fTail; 111 GrTextStrike* fTail;
113 112
114 GrGpu* fGpu; 113 GrGpu* fGpu;
115 GrAtlasMgr* fAtlasMgr[kMaskFormatCount]; 114 GrAtlasMgr* fAtlasMgr[kMaskFormatCount];
116 115
117 GrTextStrike* generateStrike(GrFontScaler*, const Key&); 116 GrTextStrike* generateStrike(GrFontScaler*, const Key&);
118 inline void detachStrikeFromList(GrTextStrike*); 117 inline void detachStrikeFromList(GrTextStrike*);
118 void purgeStrike(GrTextStrike* strike);
119 }; 119 };
120 120
121 #endif 121 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrTHashTable.h ('k') | src/gpu/GrTextStrike.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698