OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 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 SkTextBlob_DEFINED | 8 #ifndef SkTextBlob_DEFINED |
9 #define SkTextBlob_DEFINED | 9 #define SkTextBlob_DEFINED |
10 | 10 |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 uint32_t posStart; // index into fPosBuffer | 62 uint32_t posStart; // index into fPosBuffer |
63 SkPoint offset; // run offset (unsued for fully positioned
glyphs) | 63 SkPoint offset; // run offset (unsued for fully positioned
glyphs) |
64 SkPaint font; | 64 SkPaint font; |
65 GlyphPositioning positioning; | 65 GlyphPositioning positioning; |
66 }; | 66 }; |
67 | 67 |
68 SkTextBlob(uint16_t* glyphs, SkScalar* pos, const SkTArray<Run>* runs, const
SkRect& bounds); | 68 SkTextBlob(uint16_t* glyphs, SkScalar* pos, const SkTArray<Run>* runs, const
SkRect& bounds); |
69 | 69 |
70 friend class SkCanvas; | 70 friend class SkCanvas; |
71 friend class SkTextBlobBuilder; | 71 friend class SkTextBlobBuilder; |
| 72 friend class TextBlobTester; |
72 | 73 |
73 const SkAutoTMalloc<uint16_t> fGlyphBuffer; | 74 const SkAutoTMalloc<uint16_t> fGlyphBuffer; |
74 const SkAutoTMalloc<SkScalar> fPosBuffer; | 75 const SkAutoTMalloc<SkScalar> fPosBuffer; |
75 | 76 |
76 // SkTArray required here for run font destruction. | 77 // SkTArray required here for run font destruction. |
77 SkAutoTDelete<const SkTArray<Run> > fRuns; | 78 SkAutoTDelete<const SkTArray<Run> > fRuns; |
78 const SkRect fBounds; | 79 const SkRect fBounds; |
79 | 80 |
80 mutable uint32_t fUniqueID; | 81 mutable uint32_t fUniqueID; |
81 | 82 |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 SkTDArray<SkScalar> fPosBuffer; | 171 SkTDArray<SkScalar> fPosBuffer; |
171 SkTArray<SkTextBlob::Run>* fRuns; | 172 SkTArray<SkTextBlob::Run>* fRuns; |
172 | 173 |
173 SkRect fBounds; | 174 SkRect fBounds; |
174 bool fDeferredBounds; | 175 bool fDeferredBounds; |
175 | 176 |
176 RunBuffer fCurrentRunBuffer; | 177 RunBuffer fCurrentRunBuffer; |
177 }; | 178 }; |
178 | 179 |
179 #endif // SkTextBlob_DEFINED | 180 #endif // SkTextBlob_DEFINED |
OLD | NEW |