| 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 GrTextUtils_DEFINED | 8 #ifndef GrTextUtils_DEFINED |
| 9 #define GrTextUtils_DEFINED | 9 #define GrTextUtils_DEFINED |
| 10 | 10 |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 const SkIRect& clipBounds); | 74 const SkIRect& clipBounds); |
| 75 | 75 |
| 76 static void DrawPosTextAsPath(GrContext* context, | 76 static void DrawPosTextAsPath(GrContext* context, |
| 77 GrDrawContext* dc, | 77 GrDrawContext* dc, |
| 78 const SkSurfaceProps& props, | 78 const SkSurfaceProps& props, |
| 79 const GrClip& clip, | 79 const GrClip& clip, |
| 80 const SkPaint& origPaint, const SkMatrix& view
Matrix, | 80 const SkPaint& origPaint, const SkMatrix& view
Matrix, |
| 81 const char text[], size_t byteLength, | 81 const char text[], size_t byteLength, |
| 82 const SkScalar pos[], int scalarsPerPosition, | 82 const SkScalar pos[], int scalarsPerPosition, |
| 83 const SkPoint& offset, const SkIRect& clipBoun
ds); | 83 const SkPoint& offset, const SkIRect& clipBoun
ds); |
| 84 |
| 85 static bool ShouldDisableLCD(const SkPaint& paint); |
| 86 |
| 87 static GrFontScaler* GetGrFontScaler(SkGlyphCache* cache); |
| 88 static uint32_t FilterTextFlags(const SkSurfaceProps& surfaceProps, const Sk
Paint& paint); |
| 89 |
| 84 private: | 90 private: |
| 85 static void InitDistanceFieldPaint(GrAtlasTextBlob* blob, | 91 static void InitDistanceFieldPaint(GrAtlasTextBlob* blob, |
| 86 SkPaint* skPaint, | 92 SkPaint* skPaint, |
| 87 SkScalar* textRatio, | 93 SkScalar* textRatio, |
| 88 const SkMatrix& viewMatrix); | 94 const SkMatrix& viewMatrix); |
| 89 | 95 |
| 90 static void BmpAppendGlyph(GrAtlasTextBlob*, int runIndex, GrBatchFontCache*
, | 96 static void BmpAppendGlyph(GrAtlasTextBlob*, int runIndex, GrBatchFontCache*
, |
| 91 GrBatchTextStrike**, const SkGlyph&, int left, in
t top, | 97 GrBatchTextStrike**, const SkGlyph&, int left, in
t top, |
| 92 GrColor color, GrFontScaler*); | 98 GrColor color, GrFontScaler*); |
| 93 | 99 |
| 94 static bool DfAppendGlyph(GrAtlasTextBlob*, int runIndex, GrBatchFontCache*, | 100 static bool DfAppendGlyph(GrAtlasTextBlob*, int runIndex, GrBatchFontCache*, |
| 95 GrBatchTextStrike**, const SkGlyph&, | 101 GrBatchTextStrike**, const SkGlyph&, |
| 96 SkScalar sx, SkScalar sy, GrColor color, | 102 SkScalar sx, SkScalar sy, GrColor color, |
| 97 GrFontScaler* scaler, | 103 GrFontScaler* scaler, |
| 98 SkScalar textRatio, const SkMatrix& viewMatrix); | 104 SkScalar textRatio, const SkMatrix& viewMatrix); |
| 99 }; | 105 }; |
| 100 | 106 |
| 101 #endif | 107 #endif |
| OLD | NEW |