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

Side by Side Diff: bench/RegionBench.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/RefCntBench.cpp ('k') | bench/RegionContainBench.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 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 #include "Benchmark.h" 8 #include "Benchmark.h"
9 #include "SkRandom.h" 9 #include "SkRandom.h"
10 #include "SkRegion.h" 10 #include "SkRegion.h"
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 } 99 }
100 } 100 }
101 101
102 bool isSuitableFor(Backend backend) override { 102 bool isSuitableFor(Backend backend) override {
103 return backend == kNonRendering_Backend; 103 return backend == kNonRendering_Backend;
104 } 104 }
105 105
106 protected: 106 protected:
107 const char* onGetName() override { return fName.c_str(); } 107 const char* onGetName() override { return fName.c_str(); }
108 108
109 void onDraw(const int loops, SkCanvas* canvas) override { 109 void onDraw(int loops, SkCanvas* canvas) override {
110 Proc proc = fProc; 110 Proc proc = fProc;
111 for (int i = 0; i < loops; ++i) { 111 for (int i = 0; i < loops; ++i) {
112 proc(fA, fB); 112 proc(fA, fB);
113 } 113 }
114 } 114 }
115 115
116 private: 116 private:
117 typedef Benchmark INHERITED; 117 typedef Benchmark INHERITED;
118 }; 118 };
119 119
120 /////////////////////////////////////////////////////////////////////////////// 120 ///////////////////////////////////////////////////////////////////////////////
121 121
122 #define SMALL 16 122 #define SMALL 16
123 123
124 DEF_BENCH(return new RegionBench(SMALL, union_proc, "union");) 124 DEF_BENCH(return new RegionBench(SMALL, union_proc, "union");)
125 DEF_BENCH(return new RegionBench(SMALL, sect_proc, "intersect");) 125 DEF_BENCH(return new RegionBench(SMALL, sect_proc, "intersect");)
126 DEF_BENCH(return new RegionBench(SMALL, diff_proc, "difference");) 126 DEF_BENCH(return new RegionBench(SMALL, diff_proc, "difference");)
127 DEF_BENCH(return new RegionBench(SMALL, diffrect_proc, "differencerect");) 127 DEF_BENCH(return new RegionBench(SMALL, diffrect_proc, "differencerect");)
128 DEF_BENCH(return new RegionBench(SMALL, diffrectbig_proc, "differencerectbig");) 128 DEF_BENCH(return new RegionBench(SMALL, diffrectbig_proc, "differencerectbig");)
129 DEF_BENCH(return new RegionBench(SMALL, containsrect_proc, "containsrect");) 129 DEF_BENCH(return new RegionBench(SMALL, containsrect_proc, "containsrect");)
130 DEF_BENCH(return new RegionBench(SMALL, sectsrgn_proc, "intersectsrgn");) 130 DEF_BENCH(return new RegionBench(SMALL, sectsrgn_proc, "intersectsrgn");)
131 DEF_BENCH(return new RegionBench(SMALL, sectsrect_proc, "intersectsrect");) 131 DEF_BENCH(return new RegionBench(SMALL, sectsrect_proc, "intersectsrect");)
132 DEF_BENCH(return new RegionBench(SMALL, containsxy_proc, "containsxy");) 132 DEF_BENCH(return new RegionBench(SMALL, containsxy_proc, "containsxy");)
OLDNEW
« no previous file with comments | « bench/RefCntBench.cpp ('k') | bench/RegionContainBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698