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 GrAtlasTextContext_DEFINED | 8 #ifndef GrAtlasTextContext_DEFINED |
9 #define GrAtlasTextContext_DEFINED | 9 #define GrAtlasTextContext_DEFINED |
10 | 10 |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 inline bool canDrawAsDistanceFields(const SkPaint&, const SkMatrix& viewMatr
ix); | 58 inline bool canDrawAsDistanceFields(const SkPaint&, const SkMatrix& viewMatr
ix); |
59 GrAtlasTextBlob* setupDFBlob(int glyphCount, const SkPaint& origPaint, | 59 GrAtlasTextBlob* setupDFBlob(int glyphCount, const SkPaint& origPaint, |
60 const SkMatrix& viewMatrix, SkGlyphCache** cache
, | 60 const SkMatrix& viewMatrix, SkGlyphCache** cache
, |
61 SkPaint* dfPaint, SkScalar* textRatio); | 61 SkPaint* dfPaint, SkScalar* textRatio); |
62 void bmpAppendGlyph(GrAtlasTextBlob*, int runIndex, const SkGlyph&, int left
, int top, | 62 void bmpAppendGlyph(GrAtlasTextBlob*, int runIndex, const SkGlyph&, int left
, int top, |
63 GrColor color, GrFontScaler*, const SkIRect& clipRect); | 63 GrColor color, GrFontScaler*, const SkIRect& clipRect); |
64 bool dfAppendGlyph(GrAtlasTextBlob*, int runIndex, const SkGlyph&, SkScalar
sx, SkScalar sy, | 64 bool dfAppendGlyph(GrAtlasTextBlob*, int runIndex, const SkGlyph&, SkScalar
sx, SkScalar sy, |
65 GrColor color, GrFontScaler*, const SkIRect& clipRect, Sk
Scalar textRatio, | 65 GrColor color, GrFontScaler*, const SkIRect& clipRect, Sk
Scalar textRatio, |
66 const SkMatrix& viewMatrix); | 66 const SkMatrix& viewMatrix); |
67 inline void appendGlyphPath(GrAtlasTextBlob*, GrGlyph*, GrFontScaler*, const
SkGlyph&, | 67 inline void appendGlyphPath(GrAtlasTextBlob*, GrGlyph*, GrFontScaler*, const
SkGlyph&, |
68 SkScalar x, SkScalar y); | 68 SkScalar x, SkScalar y, SkScalar scale = 1.0f, |
| 69 bool applyVM = false); |
69 inline void appendGlyphCommon(GrAtlasTextBlob*, Run*, Run::SubRunInfo*, | 70 inline void appendGlyphCommon(GrAtlasTextBlob*, Run*, Run::SubRunInfo*, |
70 const SkRect& positions, GrColor color, | 71 const SkRect& positions, GrColor color, |
71 size_t vertexStride, bool useVertexColor, | 72 size_t vertexStride, bool useVertexColor, |
72 GrGlyph*); | 73 GrGlyph*); |
73 | 74 |
74 inline void flushRunAsPaths(GrRenderTarget*, | 75 inline void flushRunAsPaths(GrRenderTarget*, |
75 const SkTextBlob::RunIterator&, const GrClip& cl
ip, | 76 const SkTextBlob::RunIterator&, const GrClip& cl
ip, |
76 const SkPaint&, SkDrawFilter*, | 77 const SkPaint&, SkDrawFilter*, |
77 const SkMatrix& viewMatrix, const SkIRect& clipB
ounds, SkScalar x, | 78 const SkMatrix& viewMatrix, const SkIRect& clipB
ounds, SkScalar x, |
78 SkScalar y); | 79 SkScalar y); |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 friend class TextBatch; | 187 friend class TextBatch; |
187 | 188 |
188 #ifdef GR_TEST_UTILS | 189 #ifdef GR_TEST_UTILS |
189 DRAW_BATCH_TEST_FRIEND(TextBlobBatch); | 190 DRAW_BATCH_TEST_FRIEND(TextBlobBatch); |
190 #endif | 191 #endif |
191 | 192 |
192 typedef GrTextContext INHERITED; | 193 typedef GrTextContext INHERITED; |
193 }; | 194 }; |
194 | 195 |
195 #endif | 196 #endif |
OLD | NEW |