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

Side by Side Diff: src/gpu/text/GrBatchFontCache.h

Issue 1709133003: Revert of Use unorm shorts for texture coordinates when rendering text. (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 | « src/gpu/text/GrAtlasTextBlob_regenInBatch.cpp ('k') | src/gpu/text/GrBatchFontCache.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 2015 Google Inc. 2 * Copyright 2015 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 GrBatchFontCache_DEFINED 8 #ifndef GrBatchFontCache_DEFINED
9 #define GrBatchFontCache_DEFINED 9 #define GrBatchFontCache_DEFINED
10 10
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 return this->getAtlas(format)->addToAtlas(id, target, width, height, ima ge, loc); 164 return this->getAtlas(format)->addToAtlas(id, target, width, height, ima ge, loc);
165 } 165 }
166 166
167 // Some clients may wish to verify the integrity of the texture backing stor e of the 167 // Some clients may wish to verify the integrity of the texture backing stor e of the
168 // GrBatchAtlas. The atlasGeneration returned below is a monitonically incr easing number which 168 // GrBatchAtlas. The atlasGeneration returned below is a monitonically incr easing number which
169 // changes everytime something is removed from the texture backing store. 169 // changes everytime something is removed from the texture backing store.
170 uint64_t atlasGeneration(GrMaskFormat format) const { 170 uint64_t atlasGeneration(GrMaskFormat format) const {
171 return this->getAtlas(format)->atlasGeneration(); 171 return this->getAtlas(format)->atlasGeneration();
172 } 172 }
173 173
174 int log2Width(GrMaskFormat format) { return fAtlasConfigs[format].fLog2Width ; }
175 int log2Height(GrMaskFormat format) { return fAtlasConfigs[format].fLog2Heig ht; }
176
177 /////////////////////////////////////////////////////////////////////////// 174 ///////////////////////////////////////////////////////////////////////////
178 // Functions intended debug only 175 // Functions intended debug only
179 void dump() const; 176 void dump() const;
180 177
181 void setAtlasSizes_ForTesting(const GrBatchAtlasConfig configs[3]); 178 void setAtlasSizes_ForTesting(const GrBatchAtlasConfig configs[3]);
182 179
183 private: 180 private:
184 static GrPixelConfig MaskFormatToPixelConfig(GrMaskFormat format) { 181 static GrPixelConfig MaskFormatToPixelConfig(GrMaskFormat format) {
185 static const GrPixelConfig kPixelConfigs[] = { 182 static const GrPixelConfig kPixelConfigs[] = {
186 kAlpha_8_GrPixelConfig, 183 kAlpha_8_GrPixelConfig,
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 static void HandleEviction(GrBatchAtlas::AtlasID, void*); 219 static void HandleEviction(GrBatchAtlas::AtlasID, void*);
223 220
224 GrContext* fContext; 221 GrContext* fContext;
225 SkTDynamicHash<GrBatchTextStrike, GrFontDescKey> fCache; 222 SkTDynamicHash<GrBatchTextStrike, GrFontDescKey> fCache;
226 GrBatchAtlas* fAtlases[kMaskFormatCount]; 223 GrBatchAtlas* fAtlases[kMaskFormatCount];
227 GrBatchTextStrike* fPreserveStrike; 224 GrBatchTextStrike* fPreserveStrike;
228 GrBatchAtlasConfig fAtlasConfigs[kMaskFormatCount]; 225 GrBatchAtlasConfig fAtlasConfigs[kMaskFormatCount];
229 }; 226 };
230 227
231 #endif 228 #endif
OLDNEW
« no previous file with comments | « src/gpu/text/GrAtlasTextBlob_regenInBatch.cpp ('k') | src/gpu/text/GrBatchFontCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698