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

Side by Side Diff: src/utils/SkTextBox.cpp

Issue 1316233002: Style Change: NULL->nullptr (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-27 (Thursday) 10:25:06 EDT Created 5 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 | « src/utils/SkRTConf.cpp ('k') | src/utils/SkTextureCompressor.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 2006 The Android Open Source Project 2 * Copyright 2006 The Android Open Source Project
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 #include "SkTextBox.h" 8 #include "SkTextBox.h"
9 #include "SkUtils.h" 9 #include "SkUtils.h"
10 10
11 static inline int is_ws(int c) 11 static inline int is_ws(int c)
12 { 12 {
13 return !((c - 1) >> 5); 13 return !((c - 1) >> 5);
14 } 14 }
15 15
16 static size_t linebreak(const char text[], const char stop[], 16 static size_t linebreak(const char text[], const char stop[],
17 const SkPaint& paint, SkScalar margin, 17 const SkPaint& paint, SkScalar margin,
18 size_t* trailing = NULL) 18 size_t* trailing = nullptr)
19 { 19 {
20 size_t lengthBreak = paint.breakText(text, stop - text, margin); 20 size_t lengthBreak = paint.breakText(text, stop - text, margin);
21 21
22 //Check for white space or line breakers before the lengthBreak 22 //Check for white space or line breakers before the lengthBreak
23 const char* start = text; 23 const char* start = text;
24 const char* word_start = text; 24 const char* word_start = text;
25 int prevWS = true; 25 int prevWS = true;
26 if (trailing) { 26 if (trailing) {
27 *trailing = 0; 27 *trailing = 0;
28 } 28 }
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 294
295 SkTextBlob* SkTextBox::snapshotTextBlob(SkScalar* computedBottom) const { 295 SkTextBlob* SkTextBox::snapshotTextBlob(SkScalar* computedBottom) const {
296 TextBlobVisitor visitor; 296 TextBlobVisitor visitor;
297 SkScalar newB = this->visit(visitor, fText, fLen, *fPaint); 297 SkScalar newB = this->visit(visitor, fText, fLen, *fPaint);
298 if (computedBottom) { 298 if (computedBottom) {
299 *computedBottom = newB; 299 *computedBottom = newB;
300 } 300 }
301 return (SkTextBlob*)visitor.fBuilder.build(); 301 return (SkTextBlob*)visitor.fBuilder.build();
302 } 302 }
303 303
OLDNEW
« no previous file with comments | « src/utils/SkRTConf.cpp ('k') | src/utils/SkTextureCompressor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698