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 #include "GrAtlasTextBatch.h" | 8 #include "GrAtlasTextBatch.h" |
9 | 9 |
10 #include "GrBatchFontCache.h" | |
11 #include "GrBatchFlushState.h" | 10 #include "GrBatchFlushState.h" |
12 #include "GrBatchTest.h" | 11 #include "GrBatchTest.h" |
13 #include "GrResourceProvider.h" | 12 #include "GrResourceProvider.h" |
14 | 13 |
15 #include "SkDistanceFieldGen.h" | 14 #include "SkDistanceFieldGen.h" |
16 #include "SkGlyphCache.h" | 15 #include "SkGlyphCache.h" |
17 | 16 |
18 #include "effects/GrBitmapTextGeoProc.h" | 17 #include "effects/GrBitmapTextGeoProc.h" |
19 #include "effects/GrDistanceFieldGeoProc.h" | 18 #include "effects/GrDistanceFieldGeoProc.h" |
| 19 #include "text/GrBatchFontCache.h" |
20 | 20 |
21 ////////////////////////////////////////////////////////////////////////////////
//////////////////// | 21 ////////////////////////////////////////////////////////////////////////////////
//////////////////// |
22 // A large template to handle regenerating the vertices of a textblob with as fe
w branches as | 22 // A large template to handle regenerating the vertices of a textblob with as fe
w branches as |
23 // possible | 23 // possible |
24 template <bool regenPos, bool regenCol, bool regenTexCoords> | 24 template <bool regenPos, bool regenCol, bool regenTexCoords> |
25 inline void regen_vertices(intptr_t vertex, const GrGlyph* glyph, size_t vertexS
tride, | 25 inline void regen_vertices(intptr_t vertex, const GrGlyph* glyph, size_t vertexS
tride, |
26 bool useDistanceFields, SkScalar transX, SkScalar tra
nsY, | 26 bool useDistanceFields, SkScalar transX, SkScalar tra
nsY, |
27 GrColor color) { | 27 GrColor color) { |
28 int u0, v0, u1, v1; | 28 int u0, v0, u1, v1; |
29 if (regenTexCoords) { | 29 if (regenTexCoords) { |
(...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
551 return GrDistanceFieldA8TextGeoProc::Create(color, | 551 return GrDistanceFieldA8TextGeoProc::Create(color, |
552 viewMatrix, | 552 viewMatrix, |
553 texture, | 553 texture, |
554 params, | 554 params, |
555 flags, | 555 flags, |
556 this->usesLocalCoords()); | 556 this->usesLocalCoords()); |
557 #endif | 557 #endif |
558 } | 558 } |
559 | 559 |
560 } | 560 } |
OLD | NEW |