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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 const SkMatrix& viewMatrix, const SkSurfaceProps&, const S
kTextBlob*, | 46 const SkMatrix& viewMatrix, const SkSurfaceProps&, const S
kTextBlob*, |
47 SkScalar x, SkScalar y, | 47 SkScalar x, SkScalar y, |
48 SkDrawFilter*, const SkIRect& clipBounds); | 48 SkDrawFilter*, const SkIRect& clipBounds); |
49 | 49 |
50 private: | 50 private: |
51 GrAtlasTextContext(); | 51 GrAtlasTextContext(); |
52 | 52 |
53 // sets up the descriptor on the blob and returns a detached cache. Client
must attach | 53 // sets up the descriptor on the blob and returns a detached cache. Client
must attach |
54 inline static GrColor ComputeCanonicalColor(const SkPaint&, bool lcd); | 54 inline static GrColor ComputeCanonicalColor(const SkPaint&, bool lcd); |
55 // Determines if we need to use fake gamma (and contrast boost): | 55 // Determines if we need to use fake gamma (and contrast boost): |
56 inline static uint32_t ComputeScalerContextFlags(GrDrawContext*, const GrPai
nt&); | 56 inline static uint32_t ComputeScalerContextFlags(GrDrawContext*); |
57 static void RegenerateTextBlob(GrAtlasTextBlob* bmp, | 57 static void RegenerateTextBlob(GrAtlasTextBlob* bmp, |
58 GrBatchFontCache*, | 58 GrBatchFontCache*, |
59 const GrShaderCaps&, | 59 const GrShaderCaps&, |
60 const SkPaint& skPaint, GrColor, | 60 const SkPaint& skPaint, GrColor, |
61 uint32_t scalerContextFlags, | 61 uint32_t scalerContextFlags, |
62 const SkMatrix& viewMatrix, | 62 const SkMatrix& viewMatrix, |
63 const SkSurfaceProps&, | 63 const SkSurfaceProps&, |
64 const SkTextBlob* blob, SkScalar x, SkScalar
y, | 64 const SkTextBlob* blob, SkScalar x, SkScalar
y, |
65 SkDrawFilter* drawFilter); | 65 SkDrawFilter* drawFilter); |
66 inline static bool HasLCD(const SkTextBlob*); | 66 inline static bool HasLCD(const SkTextBlob*); |
(...skipping 23 matching lines...) Expand all Loading... |
90 SkAutoTUnref<const GrDistanceFieldAdjustTable> fDistanceAdjustTable; | 90 SkAutoTUnref<const GrDistanceFieldAdjustTable> fDistanceAdjustTable; |
91 | 91 |
92 #ifdef GR_TEST_UTILS | 92 #ifdef GR_TEST_UTILS |
93 static const uint32_t kTextBlobBatchScalerContextFlags = | 93 static const uint32_t kTextBlobBatchScalerContextFlags = |
94 SkPaint::kFakeGammaAndBoostContrast_ScalerContextFlags; | 94 SkPaint::kFakeGammaAndBoostContrast_ScalerContextFlags; |
95 DRAW_BATCH_TEST_FRIEND(TextBlobBatch); | 95 DRAW_BATCH_TEST_FRIEND(TextBlobBatch); |
96 #endif | 96 #endif |
97 }; | 97 }; |
98 | 98 |
99 #endif | 99 #endif |
OLD | NEW |