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

Side by Side Diff: bench/RectoriBench.cpp

Issue 23876006: Refactoring: get rid of the SkBenchmark void* parameter. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: sync to head Created 7 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « bench/RectBench.cpp ('k') | bench/RefCntBench.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 "SkBenchmark.h" 8 #include "SkBenchmark.h"
9 #include "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkPaint.h" 10 #include "SkPaint.h"
11 #include "SkRandom.h" 11 #include "SkRandom.h"
12 #include "SkBlurMaskFilter.h" 12 #include "SkBlurMaskFilter.h"
13 #include "SkLayerDrawLooper.h" 13 #include "SkLayerDrawLooper.h"
14 14
15 // This bench replicates a problematic use case of a draw looper used 15 // This bench replicates a problematic use case of a draw looper used
16 // to create an inner blurred rect 16 // to create an inner blurred rect
17 class RectoriBench : public SkBenchmark { 17 class RectoriBench : public SkBenchmark {
18 public: 18 public:
19 RectoriBench(void* param) : INHERITED(param) {} 19 RectoriBench() {}
20 20
21 protected: 21 protected:
22 22
23 virtual const char* onGetName() { 23 virtual const char* onGetName() {
24 return "rectori"; 24 return "rectori";
25 } 25 }
26 26
27 virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE { 27 virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE {
28 SkRandom Random; 28 SkRandom Random;
29 29
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 info.fPaintBits = 0; 95 info.fPaintBits = 0;
96 info.fOffset.set(0, 0); 96 info.fOffset.set(0, 0);
97 97
98 paint = looper->addLayer(info); 98 paint = looper->addLayer(info);
99 return looper; 99 return looper;
100 } 100 }
101 101
102 typedef SkBenchmark INHERITED; 102 typedef SkBenchmark INHERITED;
103 }; 103 };
104 104
105 105 DEF_BENCH( return SkNEW_ARGS(RectoriBench, ()); )
106 DEF_BENCH( return SkNEW_ARGS(RectoriBench, (p)); )
OLDNEW
« no previous file with comments | « bench/RectBench.cpp ('k') | bench/RefCntBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698