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

Side by Side Diff: src/gpu/batches/GrAtlasTextBatch.h

Issue 1884873006: Rename lots of things from 'sRGB' to 'GammaCorrect', where appropriate (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 8 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
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 GrAtlasTextBatch_DEFINED 8 #ifndef GrAtlasTextBatch_DEFINED
9 #define GrAtlasTextBatch_DEFINED 9 #define GrAtlasTextBatch_DEFINED
10 10
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 batch->fGeoCount = 1; 51 batch->fGeoCount = 1;
52 batch->fFilteredColor = 0; 52 batch->fFilteredColor = 0;
53 batch->fFontCache = fontCache; 53 batch->fFontCache = fontCache;
54 batch->fUseBGR = false; 54 batch->fUseBGR = false;
55 return batch; 55 return batch;
56 } 56 }
57 57
58 static GrAtlasTextBatch* CreateDistanceField( 58 static GrAtlasTextBatch* CreateDistanceField(
59 int glyphCount, GrBatchFontCache* fontCache, 59 int glyphCount, GrBatchFontCache* fontCache,
60 const GrDistanceFieldAdjustTable* distanceAdjustTable, 60 const GrDistanceFieldAdjustTable* distanceAdjustTable,
61 bool useSRGBDistanceTable, 61 bool useGammaCorrectDistanceTable,
62 SkColor filteredColor, bool isLCD, 62 SkColor filteredColor, bool isLCD,
63 bool useBGR) { 63 bool useBGR) {
64 GrAtlasTextBatch* batch = new GrAtlasTextBatch; 64 GrAtlasTextBatch* batch = new GrAtlasTextBatch;
65 65
66 batch->fFontCache = fontCache; 66 batch->fFontCache = fontCache;
67 batch->fMaskType = isLCD ? kLCDDistanceField_MaskType : kGrayscaleDistan ceField_MaskType; 67 batch->fMaskType = isLCD ? kLCDDistanceField_MaskType : kGrayscaleDistan ceField_MaskType;
68 batch->fDistanceAdjustTable.reset(SkRef(distanceAdjustTable)); 68 batch->fDistanceAdjustTable.reset(SkRef(distanceAdjustTable));
69 batch->fUseSRGBDistanceTable = useSRGBDistanceTable; 69 batch->fUseGammaCorrectDistanceTable = useGammaCorrectDistanceTable;
70 batch->fFilteredColor = filteredColor; 70 batch->fFilteredColor = filteredColor;
71 batch->fUseBGR = useBGR; 71 batch->fUseBGR = useBGR;
72 batch->fBatch.fNumGlyphs = glyphCount; 72 batch->fBatch.fNumGlyphs = glyphCount;
73 batch->fGeoCount = 1; 73 batch->fGeoCount = 1;
74 return batch; 74 return batch;
75 } 75 }
76 76
77 // to avoid even the initial copy of the struct, we have a getter for the fi rst item which 77 // to avoid even the initial copy of the struct, we have a getter for the fi rst item which
78 // is used to seed the batch with its initial geometry. After seeding, the client should call 78 // is used to seed the batch with its initial geometry. After seeding, the client should call
79 // init() so the Batch can initialize itself 79 // init() so the Batch can initialize itself
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 kGrayscaleDistanceField_MaskType, 177 kGrayscaleDistanceField_MaskType,
178 kLCDDistanceField_MaskType, 178 kLCDDistanceField_MaskType,
179 } fMaskType; 179 } fMaskType;
180 bool fUseBGR; // fold this into the enum? 180 bool fUseBGR; // fold this into the enum?
181 181
182 GrBatchFontCache* fFontCache; 182 GrBatchFontCache* fFontCache;
183 183
184 // Distance field properties 184 // Distance field properties
185 SkAutoTUnref<const GrDistanceFieldAdjustTable> fDistanceAdjustTable; 185 SkAutoTUnref<const GrDistanceFieldAdjustTable> fDistanceAdjustTable;
186 SkColor fFilteredColor; 186 SkColor fFilteredColor;
187 bool fUseSRGBDistanceTable; 187 bool fUseGammaCorrectDistanceTable;
188 188
189 friend class GrBlobRegenHelper; // Needs to trigger flushes 189 friend class GrBlobRegenHelper; // Needs to trigger flushes
190 190
191 typedef GrVertexBatch INHERITED; 191 typedef GrVertexBatch INHERITED;
192 }; 192 };
193 193
194 /* 194 /*
195 * A simple helper class to abstract the interface GrAtlasTextBlob needs to rege nerate itself. 195 * A simple helper class to abstract the interface GrAtlasTextBlob needs to rege nerate itself.
196 * It'd be nicer if this was nested, but we need to forward declare it in GrAtla sTextBlob.h 196 * It'd be nicer if this was nested, but we need to forward declare it in GrAtla sTextBlob.h
197 */ 197 */
(...skipping 12 matching lines...) Expand all
210 fFlushInfo->fGlyphsToFlush += glyphCount; 210 fFlushInfo->fGlyphsToFlush += glyphCount;
211 } 211 }
212 212
213 private: 213 private:
214 const GrAtlasTextBatch* fBatch; 214 const GrAtlasTextBatch* fBatch;
215 GrVertexBatch::Target* fTarget; 215 GrVertexBatch::Target* fTarget;
216 GrAtlasTextBatch::FlushInfo* fFlushInfo; 216 GrAtlasTextBatch::FlushInfo* fFlushInfo;
217 }; 217 };
218 218
219 #endif 219 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698