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

Side by Side Diff: bench/MergeBench.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/MemsetBench.cpp ('k') | bench/MipMapBench.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 "SkImageSource.h" 10 #include "SkImageSource.h"
(...skipping 15 matching lines...) Expand all
26 } 26 }
27 27
28 void onDelayedSetup() override { 28 void onDelayedSetup() override {
29 if (!fInitialized) { 29 if (!fInitialized) {
30 make_bitmap(); 30 make_bitmap();
31 make_checkerboard(); 31 make_checkerboard();
32 fInitialized = true; 32 fInitialized = true;
33 } 33 }
34 } 34 }
35 35
36 void onDraw(const int loops, SkCanvas* canvas) override { 36 void onDraw(int loops, SkCanvas* canvas) override {
37 SkRect r = fIsSmall ? SkRect::MakeWH(FILTER_WIDTH_SMALL, FILTER_HEIGHT_S MALL) : 37 SkRect r = fIsSmall ? SkRect::MakeWH(FILTER_WIDTH_SMALL, FILTER_HEIGHT_S MALL) :
38 SkRect::MakeWH(FILTER_WIDTH_LARGE, FILTER_HEIGHT_L ARGE); 38 SkRect::MakeWH(FILTER_WIDTH_LARGE, FILTER_HEIGHT_L ARGE);
39 SkPaint paint; 39 SkPaint paint;
40 paint.setImageFilter(mergeBitmaps())->unref(); 40 paint.setImageFilter(mergeBitmaps())->unref();
41 for (int i = 0; i < loops; i++) { 41 for (int i = 0; i < loops; i++) {
42 canvas->drawRect(r, paint); 42 canvas->drawRect(r, paint);
43 } 43 }
44 } 44 }
45 45
46 private: 46 private:
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 bool fInitialized; 89 bool fInitialized;
90 SkAutoTUnref<SkImage> fImage, fCheckerboard; 90 SkAutoTUnref<SkImage> fImage, fCheckerboard;
91 91
92 typedef Benchmark INHERITED; 92 typedef Benchmark INHERITED;
93 }; 93 };
94 94
95 /////////////////////////////////////////////////////////////////////////////// 95 ///////////////////////////////////////////////////////////////////////////////
96 96
97 DEF_BENCH( return new MergeBench(true); ) 97 DEF_BENCH( return new MergeBench(true); )
98 DEF_BENCH( return new MergeBench(false); ) 98 DEF_BENCH( return new MergeBench(false); )
OLDNEW
« no previous file with comments | « bench/MemsetBench.cpp ('k') | bench/MipMapBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698