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

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

Issue 269423007: Add CPU backing store for GrAtlas to reduce texture uploads (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add assert to GrPlot::uploadTexture() 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 | « src/gpu/GrLayerCache.cpp ('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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 // make an unused plot available 83 // make an unused plot available
84 bool freeUnusedPlot(GrTextStrike* preserveStrike); 84 bool freeUnusedPlot(GrTextStrike* preserveStrike);
85 85
86 // testing 86 // testing
87 int countStrikes() const { return fCache.getArray().count(); } 87 int countStrikes() const { return fCache.getArray().count(); }
88 const GrTextStrike* strikeAt(int index) const { 88 const GrTextStrike* strikeAt(int index) const {
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 void updateTextures() {
94 for (int i = 0; i < kAtlasCount; ++i) {
95 if (fAtlasMgr[i]) {
96 fAtlasMgr[i]->uploadPlotsToTexture();
97 }
98 }
99 }
100
93 #ifdef SK_DEBUG 101 #ifdef SK_DEBUG
94 void validate() const; 102 void validate() const;
95 #else 103 #else
96 void validate() const {} 104 void validate() const {}
97 #endif 105 #endif
98 106
99 #ifdef SK_DEVELOPER 107 #ifdef SK_DEVELOPER
100 void dump() const; 108 void dump() const;
101 #endif 109 #endif
102 110
(...skipping 17 matching lines...) Expand all
120 128
121 GrGpu* fGpu; 129 GrGpu* fGpu;
122 GrAtlasMgr* fAtlasMgr[kAtlasCount]; 130 GrAtlasMgr* fAtlasMgr[kAtlasCount];
123 131
124 GrTextStrike* generateStrike(GrFontScaler*, const Key&); 132 GrTextStrike* generateStrike(GrFontScaler*, const Key&);
125 inline void detachStrikeFromList(GrTextStrike*); 133 inline void detachStrikeFromList(GrTextStrike*);
126 void purgeStrike(GrTextStrike* strike); 134 void purgeStrike(GrTextStrike* strike);
127 }; 135 };
128 136
129 #endif 137 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrLayerCache.cpp ('k') | src/gpu/GrTextStrike.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698