| 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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 const char text[], size_t byteLength, | 121 const char text[], size_t byteLength, |
| 122 const SkScalar pos[], int scalarsPerPosition, | 122 const SkScalar pos[], int scalarsPerPosition, |
| 123 const SkPoint& offset, | 123 const SkPoint& offset, |
| 124 SkScalar textRatio, | 124 SkScalar textRatio, |
| 125 SkTDArray<char>* fallbackTxt, | 125 SkTDArray<char>* fallbackTxt, |
| 126 SkTDArray<SkScalar>* fallbackPos); | 126 SkTDArray<SkScalar>* fallbackPos); |
| 127 | 127 |
| 128 // sets up the descriptor on the blob and returns a detached cache. Client
must attach | 128 // sets up the descriptor on the blob and returns a detached cache. Client
must attach |
| 129 inline static GrColor ComputeCanonicalColor(const SkPaint&, bool lcd); | 129 inline static GrColor ComputeCanonicalColor(const SkPaint&, bool lcd); |
| 130 inline SkGlyphCache* setupCache(Run*, const SkPaint&, const SkMatrix* viewMa
trix, bool noGamma); | 130 inline SkGlyphCache* setupCache(Run*, const SkPaint&, const SkMatrix* viewMa
trix, bool noGamma); |
| 131 static inline bool MustRegenerateBlob(SkScalar* outTransX, SkScalar* outTran
sY, | |
| 132 const GrAtlasTextBlob&, const SkPaint&
, GrColor, | |
| 133 const SkMaskFilter::BlurRec&, | |
| 134 const SkMatrix& viewMatrix, SkScalar x
, SkScalar y); | |
| 135 void regenerateTextBlob(GrAtlasTextBlob* bmp, const SkPaint& skPaint, GrColo
r, | 131 void regenerateTextBlob(GrAtlasTextBlob* bmp, const SkPaint& skPaint, GrColo
r, |
| 136 const SkMatrix& viewMatrix, | 132 const SkMatrix& viewMatrix, |
| 137 const SkTextBlob* blob, SkScalar x, SkScalar y, | 133 const SkTextBlob* blob, SkScalar x, SkScalar y, |
| 138 SkDrawFilter* drawFilter, | 134 SkDrawFilter* drawFilter, |
| 139 const GrClip&); | 135 const GrClip&); |
| 140 inline static bool HasLCD(const SkTextBlob*); | 136 inline static bool HasLCD(const SkTextBlob*); |
| 141 inline void initDistanceFieldPaint(GrAtlasTextBlob*, SkPaint*, SkScalar* tex
tRatio, | 137 inline void initDistanceFieldPaint(GrAtlasTextBlob*, SkPaint*, SkScalar* tex
tRatio, |
| 142 const SkMatrix&); | 138 const SkMatrix&); |
| 143 | 139 |
| 144 // Test methods | 140 // Test methods |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 friend class GrAtlasTextBatch; | 176 friend class GrAtlasTextBatch; |
| 181 | 177 |
| 182 #ifdef GR_TEST_UTILS | 178 #ifdef GR_TEST_UTILS |
| 183 DRAW_BATCH_TEST_FRIEND(TextBlobBatch); | 179 DRAW_BATCH_TEST_FRIEND(TextBlobBatch); |
| 184 #endif | 180 #endif |
| 185 | 181 |
| 186 typedef GrTextContext INHERITED; | 182 typedef GrTextContext INHERITED; |
| 187 }; | 183 }; |
| 188 | 184 |
| 189 #endif | 185 #endif |
| OLD | NEW |