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

Side by Side Diff: tools/dump_record.cpp

Issue 273643007: Convert all SkRecordPattern matchers into SkRecord mutators. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: dumper too Created 6 years, 7 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 | « tests/RecorderTest.cpp ('k') | no next file » | 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 "LazyDecodeBitmap.h" 10 #include "LazyDecodeBitmap.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 unsigned count = record.count(); 77 unsigned count = record.count();
78 int digits = 0; 78 int digits = 0;
79 while (count > 0) { 79 while (count > 0) {
80 count /= 10; 80 count /= 10;
81 digits++; 81 digits++;
82 } 82 }
83 83
84 printf("%s %s\n", FLAGS_optimize ? "optimized" : "not-optimized", name); 84 printf("%s %s\n", FLAGS_optimize ? "optimized" : "not-optimized", name);
85 for (unsigned i = 0; i < record.count(); i++) { 85 for (unsigned i = 0; i < record.count(); i++) {
86 printf("%*d ", digits, i); 86 printf("%*d ", digits, i);
87 record.visit(i, dumper); 87 record.visit<void>(i, dumper);
88 } 88 }
89 } 89 }
90 90
91 int tool_main(int argc, char** argv); 91 int tool_main(int argc, char** argv);
92 int tool_main(int argc, char** argv) { 92 int tool_main(int argc, char** argv) {
93 SkCommandLineFlags::Parse(argc, argv); 93 SkCommandLineFlags::Parse(argc, argv);
94 SkAutoGraphics ag; 94 SkAutoGraphics ag;
95 95
96 for (int i = 0; i < FLAGS_skps.count(); i++) { 96 for (int i = 0; i < FLAGS_skps.count(); i++) {
97 if (SkCommandLineFlags::ShouldSkip(FLAGS_match, FLAGS_skps[i])) { 97 if (SkCommandLineFlags::ShouldSkip(FLAGS_match, FLAGS_skps[i])) {
(...skipping 24 matching lines...) Expand all
122 } 122 }
123 123
124 return 0; 124 return 0;
125 } 125 }
126 126
127 #if !defined SK_BUILD_FOR_IOS 127 #if !defined SK_BUILD_FOR_IOS
128 int main(int argc, char * const argv[]) { 128 int main(int argc, char * const argv[]) {
129 return tool_main(argc, (char**) argv); 129 return tool_main(argc, (char**) argv);
130 } 130 }
131 #endif 131 #endif
OLDNEW
« no previous file with comments | « tests/RecorderTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698