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

Side by Side Diff: tools/VisualBench/VisualBench.cpp

Issue 1316123003: Style Change: SkNEW->new; SkDELETE->delete (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-26 (Wednesday) 15:59:00 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/PictureRenderingFlags.cpp ('k') | tools/VisualBench/VisualBenchmarkStream.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 2015 Google Inc. 2 * Copyright 2015 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 8
9 #include "VisualBench.h" 9 #include "VisualBench.h"
10 10
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 #define HUMANIZE(time) humanize(time).c_str() 50 #define HUMANIZE(time) humanize(time).c_str()
51 51
52 VisualBench::VisualBench(void* hwnd, int argc, char** argv) 52 VisualBench::VisualBench(void* hwnd, int argc, char** argv)
53 : INHERITED(hwnd) 53 : INHERITED(hwnd)
54 , fCurrentSample(0) 54 , fCurrentSample(0)
55 , fCurrentFrame(0) 55 , fCurrentFrame(0)
56 , fFlushes(1) 56 , fFlushes(1)
57 , fLoops(1) 57 , fLoops(1)
58 , fState(kPreWarmLoops_State) 58 , fState(kPreWarmLoops_State)
59 , fBenchmark(NULL) 59 , fBenchmark(NULL)
60 , fResults(SkNEW(ResultsWriter)) { 60 , fResults(new ResultsWriter) {
61 SkCommandLineFlags::Parse(argc, argv); 61 SkCommandLineFlags::Parse(argc, argv);
62 62
63 this->setTitle(); 63 this->setTitle();
64 this->setupBackend(); 64 this->setupBackend();
65 65
66 fBenchmarkStream.reset(SkNEW(VisualBenchmarkStream)); 66 fBenchmarkStream.reset(new VisualBenchmarkStream);
67 67
68 // Print header 68 // Print header
69 SkDebugf("curr/maxrss\tloops\tflushes\tmin\tmedian\tmean\tmax\tstddev\tbench \n"); 69 SkDebugf("curr/maxrss\tloops\tflushes\tmin\tmedian\tmean\tmax\tstddev\tbench \n");
70 70
71 // setup json logging if required 71 // setup json logging if required
72 if (!FLAGS_outResultsFile.isEmpty()) { 72 if (!FLAGS_outResultsFile.isEmpty()) {
73 fResults.reset(SkNEW(NanoJSONResultsWriter(FLAGS_outResultsFile[0]))); 73 fResults.reset(new NanoJSONResultsWriter(FLAGS_outResultsFile[0]));
74 } 74 }
75 75
76 if (1 == FLAGS_properties.count() % 2) { 76 if (1 == FLAGS_properties.count() % 2) {
77 SkDebugf("ERROR: --properties must be passed with an even number of argu ments.\n"); 77 SkDebugf("ERROR: --properties must be passed with an even number of argu ments.\n");
78 } else { 78 } else {
79 for (int i = 1; i < FLAGS_properties.count(); i += 2) { 79 for (int i = 1; i < FLAGS_properties.count(); i += 2) {
80 fResults->property(FLAGS_properties[i - 1], FLAGS_properties[i]); 80 fResults->property(FLAGS_properties[i - 1], FLAGS_properties[i]);
81 } 81 }
82 } 82 }
83 } 83 }
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 349
350 void application_term() { 350 void application_term() {
351 SkEvent::Term(); 351 SkEvent::Term();
352 SkGraphics::Term(); 352 SkGraphics::Term();
353 } 353 }
354 354
355 SkOSWindow* create_sk_window(void* hwnd, int argc, char** argv) { 355 SkOSWindow* create_sk_window(void* hwnd, int argc, char** argv) {
356 return new VisualBench(hwnd, argc, argv); 356 return new VisualBench(hwnd, argc, argv);
357 } 357 }
358 358
OLDNEW
« no previous file with comments | « tools/PictureRenderingFlags.cpp ('k') | tools/VisualBench/VisualBenchmarkStream.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698