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

Side by Side Diff: bench/MagnifierBench.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/LineBench.cpp ('k') | bench/MathBench.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 "SkMagnifierImageFilter.h" 10 #include "SkMagnifierImageFilter.h"
(...skipping 15 matching lines...) Expand all
26 return fIsSmall ? "magnifier_small" : "magnifier_large"; 26 return fIsSmall ? "magnifier_small" : "magnifier_large";
27 } 27 }
28 28
29 void onDelayedSetup() override { 29 void onDelayedSetup() override {
30 if (!fInitialized) { 30 if (!fInitialized) {
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 const int w = fIsSmall ? FILTER_WIDTH_SMALL : FILTER_WIDTH_LARGE; 37 const int w = fIsSmall ? FILTER_WIDTH_SMALL : FILTER_WIDTH_LARGE;
38 const int h = fIsSmall ? FILTER_HEIGHT_SMALL : FILTER_HEIGHT_LARGE; 38 const int h = fIsSmall ? FILTER_HEIGHT_SMALL : FILTER_HEIGHT_LARGE;
39 SkPaint paint; 39 SkPaint paint;
40 paint.setImageFilter( 40 paint.setImageFilter(
41 SkMagnifierImageFilter::Create( 41 SkMagnifierImageFilter::Create(
42 SkRect::MakeXYWH(SkIntToScalar(w / 4), 42 SkRect::MakeXYWH(SkIntToScalar(w / 4),
43 SkIntToScalar(h / 4), 43 SkIntToScalar(h / 4),
44 SkIntToScalar(w / 2), 44 SkIntToScalar(w / 2),
45 SkIntToScalar(h / 2)), 100))->unref(); 45 SkIntToScalar(h / 2)), 100))->unref();
46 46
(...skipping 29 matching lines...) Expand all
76 bool fIsSmall; 76 bool fIsSmall;
77 bool fInitialized; 77 bool fInitialized;
78 SkBitmap fCheckerboard; 78 SkBitmap fCheckerboard;
79 typedef Benchmark INHERITED; 79 typedef Benchmark INHERITED;
80 }; 80 };
81 81
82 /////////////////////////////////////////////////////////////////////////////// 82 ///////////////////////////////////////////////////////////////////////////////
83 83
84 DEF_BENCH( return new MagnifierBench(true); ) 84 DEF_BENCH( return new MagnifierBench(true); )
85 DEF_BENCH( return new MagnifierBench(false); ) 85 DEF_BENCH( return new MagnifierBench(false); )
OLDNEW
« no previous file with comments | « bench/LineBench.cpp ('k') | bench/MathBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698