| 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 #ifdef SK_SUPPORT_LEGACY_TEXTBLOB_BUILDER |
| 109 const SkTextBlob* build() { | 110 const SkTextBlob* build() { |
| 110 return this->make().release(); | 111 return this->make().release(); |
| 111 } | 112 } |
| 113 #endif |
| 112 | 114 |
| 113 /** | 115 /** |
| 114 * Glyph and position buffers associated with a run. | 116 * Glyph and position buffers associated with a run. |
| 115 * | 117 * |
| 116 * A run is a sequence of glyphs sharing the same font metrics | 118 * A run is a sequence of glyphs sharing the same font metrics |
| 117 * and positioning mode. | 119 * and positioning mode. |
| 118 * | 120 * |
| 119 * If textByteCount is 0, utf8text and clusters will be NULL (no | 121 * If textByteCount is 0, utf8text and clusters will be NULL (no |
| 120 * character information will be associated with the glyphs). | 122 * character information will be associated with the glyphs). |
| 121 * | 123 * |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 | 236 |
| 235 SkRect fBounds; | 237 SkRect fBounds; |
| 236 int fRunCount; | 238 int fRunCount; |
| 237 bool fDeferredBounds; | 239 bool fDeferredBounds; |
| 238 size_t fLastRun; // index into fStorage | 240 size_t fLastRun; // index into fStorage |
| 239 | 241 |
| 240 RunBuffer fCurrentRunBuffer; | 242 RunBuffer fCurrentRunBuffer; |
| 241 }; | 243 }; |
| 242 | 244 |
| 243 #endif // SkTextBlob_DEFINED | 245 #endif // SkTextBlob_DEFINED |
| OLD | NEW |