Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1208)

Side by Side Diff: include/core/SkTextBlob.h

Issue 2335493005: Use sk_sp text blob APIs (Closed)
Patch Set: SK_SUPPORT_LEGACY_TEXTBLOB_BUILDER Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « gm/texteffects.cpp ('k') | include/utils/SkTextBox.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « gm/texteffects.cpp ('k') | include/utils/SkTextBox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698