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

Side by Side Diff: tools/VisualBench/VisualLightweightBenchModule.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/subset/SubsetZoomBench.cpp ('k') | tools/VisualBench/VisualSKPBench.h » ('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 "VisualLightweightBenchModule.h" 9 #include "VisualLightweightBenchModule.h"
10 10
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 class WarmupBench : public Benchmark { 51 class WarmupBench : public Benchmark {
52 public: 52 public:
53 WarmupBench() { 53 WarmupBench() {
54 make_path(fPath); 54 make_path(fPath);
55 } 55 }
56 private: 56 private:
57 static void make_path(SkPath& path) { 57 static void make_path(SkPath& path) {
58 #include "BigPathBench.inc" 58 #include "BigPathBench.inc"
59 } 59 }
60 const char* onGetName() override { return "warmupbench"; } 60 const char* onGetName() override { return "warmupbench"; }
61 void onDraw(const int loops, SkCanvas* canvas) override { 61 void onDraw(int loops, SkCanvas* canvas) override {
62 SkPaint paint; 62 SkPaint paint;
63 paint.setStyle(SkPaint::kStroke_Style); 63 paint.setStyle(SkPaint::kStroke_Style);
64 paint.setStrokeWidth(2); 64 paint.setStrokeWidth(2);
65 for (int i = 0; i < loops; i++) { 65 for (int i = 0; i < loops; i++) {
66 canvas->drawPath(fPath, paint); 66 canvas->drawPath(fPath, paint);
67 } 67 }
68 } 68 }
69 SkPath fPath; 69 SkPath fPath;
70 }; 70 };
71 71
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 } 313 }
314 this->resetTimingState(); 314 this->resetTimingState();
315 } else { 315 } else {
316 fCurrentFrame++; 316 fCurrentFrame++;
317 } 317 }
318 } 318 }
319 319
320 bool VisualLightweightBenchModule::onHandleChar(SkUnichar c) { 320 bool VisualLightweightBenchModule::onHandleChar(SkUnichar c) {
321 return true; 321 return true;
322 } 322 }
OLDNEW
« no previous file with comments | « bench/subset/SubsetZoomBench.cpp ('k') | tools/VisualBench/VisualSKPBench.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698