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

Side by Side Diff: bench/ChartBench.cpp

Issue 1379923005: Remove const from `const int loops`. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: n too Created 5 years, 2 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 | « bench/BlurRoundRectBench.cpp ('k') | bench/ChecksumBench.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 2013 Google Inc. 2 * Copyright 2013 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 "Benchmark.h" 8 #include "Benchmark.h"
9 #include "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkPaint.h" 10 #include "SkPaint.h"
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 97
98 protected: 98 protected:
99 const char* onGetName() override { 99 const char* onGetName() override {
100 if (fAA) { 100 if (fAA) {
101 return "chart_aa"; 101 return "chart_aa";
102 } else { 102 } else {
103 return "chart_bw"; 103 return "chart_bw";
104 } 104 }
105 } 105 }
106 106
107 void onDraw(const int loops, SkCanvas* canvas) override { 107 void onDraw(int loops, SkCanvas* canvas) override {
108 bool sizeChanged = false; 108 bool sizeChanged = false;
109 if (canvas->getDeviceSize() != fSize) { 109 if (canvas->getDeviceSize() != fSize) {
110 fSize = canvas->getDeviceSize(); 110 fSize = canvas->getDeviceSize();
111 sizeChanged = true; 111 sizeChanged = true;
112 } 112 }
113 113
114 SkScalar ySpread = SkIntToScalar(fSize.fHeight / 20); 114 SkScalar ySpread = SkIntToScalar(fSize.fHeight / 20);
115 115
116 SkScalar height = SkIntToScalar(fSize.fHeight); 116 SkScalar height = SkIntToScalar(fSize.fHeight);
117 if (sizeChanged) { 117 if (sizeChanged) {
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 SkTDArray<SkScalar> fData[kNumGraphs]; 185 SkTDArray<SkScalar> fData[kNumGraphs];
186 bool fAA; 186 bool fAA;
187 187
188 typedef Benchmark INHERITED; 188 typedef Benchmark INHERITED;
189 }; 189 };
190 190
191 ////////////////////////////////////////////////////////////////////////////// 191 //////////////////////////////////////////////////////////////////////////////
192 192
193 DEF_BENCH( return new ChartBench(true); ) 193 DEF_BENCH( return new ChartBench(true); )
194 DEF_BENCH( return new ChartBench(false); ) 194 DEF_BENCH( return new ChartBench(false); )
OLDNEW
« no previous file with comments | « bench/BlurRoundRectBench.cpp ('k') | bench/ChecksumBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698