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

Side by Side Diff: bench/ShaderMaskBench.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/ScalarBench.cpp ('k') | bench/Sk4fBench.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 "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkColorShader.h" 10 #include "SkColorShader.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 } 47 }
48 48
49 protected: 49 protected:
50 virtual const char* onGetName() { 50 virtual const char* onGetName() {
51 fName.printf("shadermask"); 51 fName.printf("shadermask");
52 fName.appendf("_%s", fontQualityName(fPaint)); 52 fName.appendf("_%s", fontQualityName(fPaint));
53 fName.appendf("_%02X", fPaint.getAlpha()); 53 fName.appendf("_%02X", fPaint.getAlpha());
54 return fName.c_str(); 54 return fName.c_str();
55 } 55 }
56 56
57 virtual void onDraw(const int loops, SkCanvas* canvas) { 57 virtual void onDraw(int loops, SkCanvas* canvas) {
58 const SkIPoint dim = this->getSize(); 58 const SkIPoint dim = this->getSize();
59 SkRandom rand; 59 SkRandom rand;
60 60
61 SkPaint paint(fPaint); 61 SkPaint paint(fPaint);
62 this->setupPaint(&paint); 62 this->setupPaint(&paint);
63 // explicitly need these 63 // explicitly need these
64 paint.setAlpha(fPaint.getAlpha()); 64 paint.setAlpha(fPaint.getAlpha());
65 paint.setAntiAlias(kBW != fFQ); 65 paint.setAntiAlias(kBW != fFQ);
66 paint.setLCDRenderText(kLCD == fFQ); 66 paint.setLCDRenderText(kLCD == fFQ);
67 67
(...skipping 20 matching lines...) Expand all
88 }; 88 };
89 89
90 /////////////////////////////////////////////////////////////////////////////// 90 ///////////////////////////////////////////////////////////////////////////////
91 91
92 DEF_BENCH( return new ShaderMaskBench(true, kBW); ) 92 DEF_BENCH( return new ShaderMaskBench(true, kBW); )
93 DEF_BENCH( return new ShaderMaskBench(false, kBW); ) 93 DEF_BENCH( return new ShaderMaskBench(false, kBW); )
94 DEF_BENCH( return new ShaderMaskBench(true, kAA); ) 94 DEF_BENCH( return new ShaderMaskBench(true, kAA); )
95 DEF_BENCH( return new ShaderMaskBench(false, kAA); ) 95 DEF_BENCH( return new ShaderMaskBench(false, kAA); )
96 DEF_BENCH( return new ShaderMaskBench(true, kLCD); ) 96 DEF_BENCH( return new ShaderMaskBench(true, kLCD); )
97 DEF_BENCH( return new ShaderMaskBench(false, kLCD); ) 97 DEF_BENCH( return new ShaderMaskBench(false, kLCD); )
OLDNEW
« no previous file with comments | « bench/ScalarBench.cpp ('k') | bench/Sk4fBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698