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

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

Issue 1459343006: Small tidys GrAtlasTextContext (Closed) Base URL: https://skia.googlesource.com/skia.git@text2
Patch Set: small tidys Created 5 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
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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 bool usesDistanceFields() const { 163 bool usesDistanceFields() const {
164 return kGrayscaleDistanceField_MaskType == fMaskType || 164 return kGrayscaleDistanceField_MaskType == fMaskType ||
165 kLCDDistanceField_MaskType == fMaskType; 165 kLCDDistanceField_MaskType == fMaskType;
166 } 166 }
167 167
168 bool isLCD() const { 168 bool isLCD() const {
169 return kLCDCoverageMask_MaskType == fMaskType || 169 return kLCDCoverageMask_MaskType == fMaskType ||
170 kLCDDistanceField_MaskType == fMaskType; 170 kLCDDistanceField_MaskType == fMaskType;
171 } 171 }
172 172
173 inline void regenerateTextureCoords(GrGlyph* glyph, intptr_t vertex, size_t vertexStride); 173 inline void regenerateTextureCoords(const GrGlyph* glyph, void* vertices, in t glyphIdx,
174 size_t vertexStartIndex, size_t vertexSt ride);
174 175
175 inline void regenerateColors(intptr_t vertex, size_t vertexStride, GrColor c olor); 176 inline void regenerateColors(void* vertices, int glyphIdx, size_t vertexStar tIndex,
177 size_t vertexStride, GrColor color);
176 178
177 inline void regeneratePositions(intptr_t vertex, size_t vertexStride, SkScal ar transX, 179 inline void regeneratePositions(void* vertices, int glyphIdx, size_t vertexS tartIndex,
178 SkScalar transY); 180 size_t vertexStride, SkScalar transX, SkScal ar transY);
179 181
180 inline void flush(GrVertexBatch::Target* target, FlushInfo* flushInfo); 182 inline void flush(GrVertexBatch::Target* target, FlushInfo* flushInfo);
181 183
182 GrColor color() const { return fBatch.fColor; } 184 GrColor color() const { return fBatch.fColor; }
183 const SkMatrix& viewMatrix() const { return fBatch.fViewMatrix; } 185 const SkMatrix& viewMatrix() const { return fBatch.fViewMatrix; }
184 bool usesLocalCoords() const { return fBatch.fUsesLocalCoords; } 186 bool usesLocalCoords() const { return fBatch.fUsesLocalCoords; }
185 int numGlyphs() const { return fBatch.fNumGlyphs; } 187 int numGlyphs() const { return fBatch.fNumGlyphs; }
186 188
187 bool onCombineIfPossible(GrBatch* t, const GrCaps& caps) override; 189 bool onCombineIfPossible(GrBatch* t, const GrCaps& caps) override;
188 190
(...skipping 29 matching lines...) Expand all
218 GrBatchFontCache* fFontCache; 220 GrBatchFontCache* fFontCache;
219 221
220 // Distance field properties 222 // Distance field properties
221 SkAutoTUnref<const DistanceAdjustTable> fDistanceAdjustTable; 223 SkAutoTUnref<const DistanceAdjustTable> fDistanceAdjustTable;
222 SkColor fFilteredColor; 224 SkColor fFilteredColor;
223 225
224 typedef GrVertexBatch INHERITED; 226 typedef GrVertexBatch INHERITED;
225 }; 227 };
226 228
227 #endif 229 #endif
OLDNEW
« no previous file with comments | « no previous file | src/gpu/batches/GrAtlasTextBatch.cpp » ('j') | src/gpu/batches/GrAtlasTextBatch.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698