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

Side by Side Diff: tools/DumpRecord.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 | « tools/CrashHandler.cpp ('k') | tools/LazyDecodeBitmap.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 * 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 #include <stdio.h> 8 #include <stdio.h>
9 9
10 #include "SkRecord.h" 10 #include "SkRecord.h"
11 #include "SkRecordDraw.h" 11 #include "SkRecordDraw.h"
12 12
13 #include "DumpRecord.h" 13 #include "DumpRecord.h"
14 #include "Timer.h" 14 #include "Timer.h"
15 15
16 namespace { 16 namespace {
17 17
18 class Dumper { 18 class Dumper {
19 public: 19 public:
20 explicit Dumper(SkCanvas* canvas, int count, bool timeWithCommand) 20 explicit Dumper(SkCanvas* canvas, int count, bool timeWithCommand)
21 : fDigits(0) 21 : fDigits(0)
22 , fIndent(0) 22 , fIndent(0)
23 , fIndex(0) 23 , fIndex(0)
24 , fDraw(canvas, NULL, NULL, 0, NULL) 24 , fDraw(canvas, nullptr, nullptr, 0, nullptr)
25 , fTimeWithCommand(timeWithCommand) { 25 , fTimeWithCommand(timeWithCommand) {
26 while (count > 0) { 26 while (count > 0) {
27 count /= 10; 27 count /= 10;
28 fDigits++; 28 fDigits++;
29 } 29 }
30 } 30 }
31 31
32 template <typename T> 32 template <typename T>
33 void operator()(const T& command) { 33 void operator()(const T& command) {
34 Timer timer; 34 Timer timer;
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 } // namespace 102 } // namespace
103 103
104 void DumpRecord(const SkRecord& record, 104 void DumpRecord(const SkRecord& record,
105 SkCanvas* canvas, 105 SkCanvas* canvas,
106 bool timeWithCommand) { 106 bool timeWithCommand) {
107 Dumper dumper(canvas, record.count(), timeWithCommand); 107 Dumper dumper(canvas, record.count(), timeWithCommand);
108 for (int i = 0; i < record.count(); i++) { 108 for (int i = 0; i < record.count(); i++) {
109 record.visit<void>(i, dumper); 109 record.visit<void>(i, dumper);
110 } 110 }
111 } 111 }
OLDNEW
« no previous file with comments | « tools/CrashHandler.cpp ('k') | tools/LazyDecodeBitmap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698