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

Side by Side Diff: samplecode/SampleMeasure.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 | « samplecode/SampleManyRects.cpp ('k') | samplecode/SamplePatch.cpp » ('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 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 #include "SampleCode.h" 8 #include "SampleCode.h"
9 #include "SkView.h" 9 #include "SkView.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 17 matching lines...) Expand all
28 }; 28 };
29 29
30 static const Setting gSettings[] = { 30 static const Setting gSettings[] = {
31 { false, false }, 31 { false, false },
32 { false, true }, 32 { false, true },
33 { true, false }, 33 { true, false },
34 { true, true }, 34 { true, true },
35 }; 35 };
36 36
37 static void doMeasure(SkCanvas* canvas, const SkPaint& paint, const char text[]) { 37 static void doMeasure(SkCanvas* canvas, const SkPaint& paint, const char text[]) {
38 SkScalar dy = paint.getFontMetrics(NULL); 38 SkScalar dy = paint.getFontMetrics(nullptr);
39 39
40 size_t len = strlen(text); 40 size_t len = strlen(text);
41 SkAutoTMalloc<SkScalar> autoWidths(len); 41 SkAutoTMalloc<SkScalar> autoWidths(len);
42 SkScalar* widths = autoWidths.get(); 42 SkScalar* widths = autoWidths.get();
43 SkAutoTMalloc<SkRect> autoRects(len); 43 SkAutoTMalloc<SkRect> autoRects(len);
44 SkRect* rects = autoRects.get(); 44 SkRect* rects = autoRects.get();
45 SkRect bounds; 45 SkRect bounds;
46 46
47 SkPaint p(paint); 47 SkPaint p(paint);
48 for (size_t i = 0; i < SK_ARRAY_COUNT(gSettings); i++) { 48 for (size_t i = 0; i < SK_ARRAY_COUNT(gSettings); i++) {
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 } 104 }
105 105
106 private: 106 private:
107 typedef SampleView INHERITED; 107 typedef SampleView INHERITED;
108 }; 108 };
109 109
110 ////////////////////////////////////////////////////////////////////////////// 110 //////////////////////////////////////////////////////////////////////////////
111 111
112 static SkView* MyFactory() { return new MeasureView; } 112 static SkView* MyFactory() { return new MeasureView; }
113 static SkViewRegister reg(MyFactory); 113 static SkViewRegister reg(MyFactory);
OLDNEW
« no previous file with comments | « samplecode/SampleManyRects.cpp ('k') | samplecode/SamplePatch.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698