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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 SkTextBlobBuilder(); | 99 SkTextBlobBuilder(); |
100 | 100 |
101 ~SkTextBlobBuilder(); | 101 ~SkTextBlobBuilder(); |
102 | 102 |
103 /** | 103 /** |
104 * Returns an immutable SkTextBlob for the current runs/glyphs. The builder
is reset and | 104 * Returns an immutable SkTextBlob for the current runs/glyphs. The builder
is reset and |
105 * can be reused. | 105 * can be reused. |
106 */ | 106 */ |
107 sk_sp<SkTextBlob> make(); | 107 sk_sp<SkTextBlob> make(); |
108 | 108 |
109 const SkTextBlob* build() { | |
110 return this->make().release(); | |
111 } | |
112 | |
113 /** | 109 /** |
114 * Glyph and position buffers associated with a run. | 110 * Glyph and position buffers associated with a run. |
115 * | 111 * |
116 * A run is a sequence of glyphs sharing the same font metrics | 112 * A run is a sequence of glyphs sharing the same font metrics |
117 * and positioning mode. | 113 * and positioning mode. |
118 * | 114 * |
119 * If textByteCount is 0, utf8text and clusters will be NULL (no | 115 * If textByteCount is 0, utf8text and clusters will be NULL (no |
120 * character information will be associated with the glyphs). | 116 * character information will be associated with the glyphs). |
121 * | 117 * |
122 * utf8text will point to a buffer of size textByteCount bytes. | 118 * utf8text will point to a buffer of size textByteCount bytes. |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 | 230 |
235 SkRect fBounds; | 231 SkRect fBounds; |
236 int fRunCount; | 232 int fRunCount; |
237 bool fDeferredBounds; | 233 bool fDeferredBounds; |
238 size_t fLastRun; // index into fStorage | 234 size_t fLastRun; // index into fStorage |
239 | 235 |
240 RunBuffer fCurrentRunBuffer; | 236 RunBuffer fCurrentRunBuffer; |
241 }; | 237 }; |
242 | 238 |
243 #endif // SkTextBlob_DEFINED | 239 #endif // SkTextBlob_DEFINED |
OLD | NEW |