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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 SkScalar x, SkScalar y, const SkIRect& regionClipBounds) ove
rride; | 44 SkScalar x, SkScalar y, const SkIRect& regionClipBounds) ove
rride; |
45 void onDrawPosText(GrDrawContext*, const GrClip&, const GrPaint&, | 45 void onDrawPosText(GrDrawContext*, const GrClip&, const GrPaint&, |
46 const SkPaint&, const SkMatrix& viewMatrix, | 46 const SkPaint&, const SkMatrix& viewMatrix, |
47 const char text[], size_t byteLength, | 47 const char text[], size_t byteLength, |
48 const SkScalar pos[], int scalarsPerPosition, | 48 const SkScalar pos[], int scalarsPerPosition, |
49 const SkPoint& offset, const SkIRect& regionClipBounds) o
verride; | 49 const SkPoint& offset, const SkIRect& regionClipBounds) o
verride; |
50 void drawTextBlob(GrDrawContext*, const GrClip&, const SkPaint&, | 50 void drawTextBlob(GrDrawContext*, const GrClip&, const SkPaint&, |
51 const SkMatrix& viewMatrix, const SkTextBlob*, SkScalar x,
SkScalar y, | 51 const SkMatrix& viewMatrix, const SkTextBlob*, SkScalar x,
SkScalar y, |
52 SkDrawFilter*, const SkIRect& clipBounds) override; | 52 SkDrawFilter*, const SkIRect& clipBounds) override; |
53 | 53 |
54 typedef GrAtlasTextBlob::Run Run; | |
55 typedef Run::SubRunInfo PerSubRunInfo; | |
56 | |
57 // sets up the descriptor on the blob and returns a detached cache. Client
must attach | 54 // sets up the descriptor on the blob and returns a detached cache. Client
must attach |
58 inline static GrColor ComputeCanonicalColor(const SkPaint&, bool lcd); | 55 inline static GrColor ComputeCanonicalColor(const SkPaint&, bool lcd); |
59 void regenerateTextBlob(GrAtlasTextBlob* bmp, const SkPaint& skPaint, GrColo
r, | 56 void regenerateTextBlob(GrAtlasTextBlob* bmp, const SkPaint& skPaint, GrColo
r, |
60 const SkMatrix& viewMatrix, | 57 const SkMatrix& viewMatrix, |
61 const SkTextBlob* blob, SkScalar x, SkScalar y, | 58 const SkTextBlob* blob, SkScalar x, SkScalar y, |
62 SkDrawFilter* drawFilter); | 59 SkDrawFilter* drawFilter); |
63 inline static bool HasLCD(const SkTextBlob*); | 60 inline static bool HasLCD(const SkTextBlob*); |
64 | 61 |
65 // Test methods | 62 // Test methods |
66 // TODO this is really ugly. It'd be much nicer if positioning could be mov
ed to batch | 63 // TODO this is really ugly. It'd be much nicer if positioning could be mov
ed to batch |
(...skipping 13 matching lines...) Expand all Loading... |
80 SkAutoTUnref<const GrDistanceFieldAdjustTable> fDistanceAdjustTable; | 77 SkAutoTUnref<const GrDistanceFieldAdjustTable> fDistanceAdjustTable; |
81 | 78 |
82 #ifdef GR_TEST_UTILS | 79 #ifdef GR_TEST_UTILS |
83 DRAW_BATCH_TEST_FRIEND(TextBlobBatch); | 80 DRAW_BATCH_TEST_FRIEND(TextBlobBatch); |
84 #endif | 81 #endif |
85 | 82 |
86 typedef GrTextContext INHERITED; | 83 typedef GrTextContext INHERITED; |
87 }; | 84 }; |
88 | 85 |
89 #endif | 86 #endif |
OLD | NEW |