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

Side by Side Diff: bench/MergeBench.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/MemsetBench.cpp ('k') | bench/MorphologyBench.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 "SkBitmapSource.h" 9 #include "SkBitmapSource.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
11 #include "SkMergeImageFilter.h" 11 #include "SkMergeImageFilter.h"
12 12
13 #define FILTER_WIDTH_SMALL SkIntToScalar(32) 13 #define FILTER_WIDTH_SMALL SkIntToScalar(32)
14 #define FILTER_HEIGHT_SMALL SkIntToScalar(32) 14 #define FILTER_HEIGHT_SMALL SkIntToScalar(32)
15 #define FILTER_WIDTH_LARGE SkIntToScalar(256) 15 #define FILTER_WIDTH_LARGE SkIntToScalar(256)
16 #define FILTER_HEIGHT_LARGE SkIntToScalar(256) 16 #define FILTER_HEIGHT_LARGE SkIntToScalar(256)
17 17
18 class MergeBench : public SkBenchmark { 18 class MergeBench : public Benchmark {
19 public: 19 public:
20 MergeBench(bool small) : fIsSmall(small), fInitialized(false) { } 20 MergeBench(bool small) : fIsSmall(small), fInitialized(false) { }
21 21
22 protected: 22 protected:
23 virtual const char* onGetName() SK_OVERRIDE { 23 virtual const char* onGetName() SK_OVERRIDE {
24 return fIsSmall ? "merge_small" : "merge_large"; 24 return fIsSmall ? "merge_small" : "merge_large";
25 } 25 }
26 26
27 virtual void onPreDraw() SK_OVERRIDE { 27 virtual void onPreDraw() SK_OVERRIDE {
28 if (!fInitialized) { 28 if (!fInitialized) {
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 canvas.drawRect(SkRect::MakeXYWH(8, 8, 8, 8), darkPaint); 81 canvas.drawRect(SkRect::MakeXYWH(8, 8, 8, 8), darkPaint);
82 canvas.restore(); 82 canvas.restore();
83 } 83 }
84 } 84 }
85 } 85 }
86 86
87 bool fIsSmall; 87 bool fIsSmall;
88 bool fInitialized; 88 bool fInitialized;
89 SkBitmap fBitmap, fCheckerboard; 89 SkBitmap fBitmap, fCheckerboard;
90 90
91 typedef SkBenchmark INHERITED; 91 typedef Benchmark INHERITED;
92 }; 92 };
93 93
94 /////////////////////////////////////////////////////////////////////////////// 94 ///////////////////////////////////////////////////////////////////////////////
95 95
96 DEF_BENCH( return new MergeBench(true); ) 96 DEF_BENCH( return new MergeBench(true); )
97 DEF_BENCH( return new MergeBench(false); ) 97 DEF_BENCH( return new MergeBench(false); )
OLDNEW
« no previous file with comments | « bench/MemsetBench.cpp ('k') | bench/MorphologyBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698