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

Side by Side Diff: bench/MagnifierBench.cpp

Issue 347823004: Remove Sk prefix from some bench classes. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: SkGMBench -> GMBench Created 6 years, 6 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 #include "SkBenchmark.h" 7 #include "Benchmark.h"
8 #include "SkBitmapDevice.h" 8 #include "SkBitmapDevice.h"
9 #include "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkMagnifierImageFilter.h" 10 #include "SkMagnifierImageFilter.h"
11 #include "SkRandom.h" 11 #include "SkRandom.h"
12 12
13 #define FILTER_WIDTH_SMALL 32 13 #define FILTER_WIDTH_SMALL 32
14 #define FILTER_HEIGHT_SMALL 32 14 #define FILTER_HEIGHT_SMALL 32
15 #define FILTER_WIDTH_LARGE 256 15 #define FILTER_WIDTH_LARGE 256
16 #define FILTER_HEIGHT_LARGE 256 16 #define FILTER_HEIGHT_LARGE 256
17 17
18 class MagnifierBench : public SkBenchmark { 18 class MagnifierBench : public Benchmark {
19 public: 19 public:
20 MagnifierBench(bool small) : 20 MagnifierBench(bool small) :
21 fIsSmall(small), fInitialized(false) { 21 fIsSmall(small), fInitialized(false) {
22 } 22 }
23 23
24 protected: 24 protected:
25 virtual const char* onGetName() SK_OVERRIDE { 25 virtual const char* onGetName() SK_OVERRIDE {
26 return fIsSmall ? "magnifier_small" : "magnifier_large"; 26 return fIsSmall ? "magnifier_small" : "magnifier_large";
27 } 27 }
28 28
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 canvas.drawRect(SkRect::MakeXYWH(0, 8, 8, 8), lightPaint); 69 canvas.drawRect(SkRect::MakeXYWH(0, 8, 8, 8), lightPaint);
70 canvas.drawRect(SkRect::MakeXYWH(8, 8, 8, 8), darkPaint); 70 canvas.drawRect(SkRect::MakeXYWH(8, 8, 8, 8), darkPaint);
71 canvas.restore(); 71 canvas.restore();
72 } 72 }
73 } 73 }
74 } 74 }
75 75
76 bool fIsSmall; 76 bool fIsSmall;
77 bool fInitialized; 77 bool fInitialized;
78 SkBitmap fCheckerboard; 78 SkBitmap fCheckerboard;
79 typedef SkBenchmark 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