OLD | NEW |
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 Loading... |
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 template <bool regenTexCoords, bool regenPos, bool regenCol, bool regenGlyph
s> |
174 | 174 inline void regenBlob(Target* target, FlushInfo* flushInfo, Blob* blob, Run*
run, |
175 inline void regenerateColors(intptr_t vertex, size_t vertexStride, GrColor c
olor); | 175 TextInfo* info, SkGlyphCache** cache, |
176 | 176 SkTypeface** typeface, GrFontScaler** scaler, const Sk
Descriptor** desc, |
177 inline void regeneratePositions(intptr_t vertex, size_t vertexStride, SkScal
ar transX, | 177 const GrGeometryProcessor* gp, int glyphCount, size_t
vertexStride, |
178 SkScalar transY); | 178 GrColor color, SkScalar transX, SkScalar transY); |
179 | 179 |
180 inline void flush(GrVertexBatch::Target* target, FlushInfo* flushInfo); | 180 inline void flush(GrVertexBatch::Target* target, FlushInfo* flushInfo); |
181 | 181 |
182 GrColor color() const { return fBatch.fColor; } | 182 GrColor color() const { return fBatch.fColor; } |
183 const SkMatrix& viewMatrix() const { return fBatch.fViewMatrix; } | 183 const SkMatrix& viewMatrix() const { return fBatch.fViewMatrix; } |
184 bool usesLocalCoords() const { return fBatch.fUsesLocalCoords; } | 184 bool usesLocalCoords() const { return fBatch.fUsesLocalCoords; } |
185 int numGlyphs() const { return fBatch.fNumGlyphs; } | 185 int numGlyphs() const { return fBatch.fNumGlyphs; } |
186 | 186 |
187 bool onCombineIfPossible(GrBatch* t, const GrCaps& caps) override; | 187 bool onCombineIfPossible(GrBatch* t, const GrCaps& caps) override; |
188 | 188 |
(...skipping 29 matching lines...) Expand all Loading... |
218 GrBatchFontCache* fFontCache; | 218 GrBatchFontCache* fFontCache; |
219 | 219 |
220 // Distance field properties | 220 // Distance field properties |
221 SkAutoTUnref<const DistanceAdjustTable> fDistanceAdjustTable; | 221 SkAutoTUnref<const DistanceAdjustTable> fDistanceAdjustTable; |
222 SkColor fFilteredColor; | 222 SkColor fFilteredColor; |
223 | 223 |
224 typedef GrVertexBatch INHERITED; | 224 typedef GrVertexBatch INHERITED; |
225 }; | 225 }; |
226 | 226 |
227 #endif | 227 #endif |
OLD | NEW |