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

Side by Side Diff: bench/RotatedRectBench.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/RepeatTileBench.cpp ('k') | bench/SKPBench.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 2014 Google Inc. 2 * Copyright 2014 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 RotRectBench(bool aa, ColorType ct, SkXfermode::Mode mode) 70 RotRectBench(bool aa, ColorType ct, SkXfermode::Mode mode)
71 : fAA(aa) 71 : fAA(aa)
72 , fColorType(ct) 72 , fColorType(ct)
73 , fMode(mode) { 73 , fMode(mode) {
74 this->makeName(); 74 this->makeName();
75 } 75 }
76 76
77 protected: 77 protected:
78 const char* onGetName() override { return fName.c_str(); } 78 const char* onGetName() override { return fName.c_str(); }
79 79
80 void onDraw(const int loops, SkCanvas* canvas) override { 80 void onDraw(int loops, SkCanvas* canvas) override {
81 SkPaint paint; 81 SkPaint paint;
82 paint.setAntiAlias(fAA); 82 paint.setAntiAlias(fAA);
83 paint.setXfermodeMode(fMode); 83 paint.setXfermodeMode(fMode);
84 SkColor color = start_color(fColorType); 84 SkColor color = start_color(fColorType);
85 85
86 int w = this->getSize().x(); 86 int w = this->getSize().x();
87 int h = this->getSize().y(); 87 int h = this->getSize().y();
88 88
89 static const SkScalar kRectW = 25.1f; 89 static const SkScalar kRectW = 25.1f;
90 static const SkScalar kRectH = 25.9f; 90 static const SkScalar kRectH = 25.9f;
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 DEF_BENCH(return new RotRectBench(true, kConstantTransparent_ColorType, SkXfermode::kDarken_Mode);) 185 DEF_BENCH(return new RotRectBench(true, kConstantTransparent_ColorType, SkXfermode::kDarken_Mode);)
186 DEF_BENCH(return new RotRectBench(true, kChangingOpaque_ColorType, SkXfermode::kDarken_Mode);) 186 DEF_BENCH(return new RotRectBench(true, kChangingOpaque_ColorType, SkXfermode::kDarken_Mode);)
187 DEF_BENCH(return new RotRectBench(true, kChangingTransparent_ColorType, SkXfermode::kDarken_Mode);) 187 DEF_BENCH(return new RotRectBench(true, kChangingTransparent_ColorType, SkXfermode::kDarken_Mode);)
188 DEF_BENCH(return new RotRectBench(true, kAlternatingOpaqueAndTransparent_ColorT ype, SkXfermode::kDarken_Mode);) 188 DEF_BENCH(return new RotRectBench(true, kAlternatingOpaqueAndTransparent_ColorT ype, SkXfermode::kDarken_Mode);)
189 189
190 DEF_BENCH(return new RotRectBench(false, kConstantOpaque_ColorType, SkXfermode::kDarken_Mode);) 190 DEF_BENCH(return new RotRectBench(false, kConstantOpaque_ColorType, SkXfermode::kDarken_Mode);)
191 DEF_BENCH(return new RotRectBench(false, kConstantTransparent_ColorType, SkXfermode::kDarken_Mode);) 191 DEF_BENCH(return new RotRectBench(false, kConstantTransparent_ColorType, SkXfermode::kDarken_Mode);)
192 DEF_BENCH(return new RotRectBench(false, kChangingOpaque_ColorType, SkXfermode::kDarken_Mode);) 192 DEF_BENCH(return new RotRectBench(false, kChangingOpaque_ColorType, SkXfermode::kDarken_Mode);)
193 DEF_BENCH(return new RotRectBench(false, kChangingTransparent_ColorType, SkXfermode::kDarken_Mode);) 193 DEF_BENCH(return new RotRectBench(false, kChangingTransparent_ColorType, SkXfermode::kDarken_Mode);)
194 DEF_BENCH(return new RotRectBench(false, kAlternatingOpaqueAndTransparent_ColorT ype, SkXfermode::kDarken_Mode);) 194 DEF_BENCH(return new RotRectBench(false, kAlternatingOpaqueAndTransparent_ColorT ype, SkXfermode::kDarken_Mode);)
OLDNEW
« no previous file with comments | « bench/RepeatTileBench.cpp ('k') | bench/SKPBench.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698