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

Side by Side Diff: src/gpu/GrAtlasTextContext.h

Issue 1315933002: Fix for distance field draw large glyph as paths (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix Created 5 years, 3 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
« no previous file with comments | « src/gpu/GrAtlasTextBlob.h ('k') | src/gpu/GrAtlasTextContext.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 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
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
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
OLDNEW
« no previous file with comments | « src/gpu/GrAtlasTextBlob.h ('k') | src/gpu/GrAtlasTextContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698