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

Unified Diff: bench/PremulAndUnpremulAlphaOpsBench.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « bench/PictureRecordBench.cpp ('k') | bench/RTreeBench.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/PremulAndUnpremulAlphaOpsBench.cpp
diff --git a/bench/PremulAndUnpremulAlphaOpsBench.cpp b/bench/PremulAndUnpremulAlphaOpsBench.cpp
index eb494f46d966212327927ceea33d0ea02e7f5c57..aac5934b4ce4a7dcdfd6a7bd0a395cf407be7a68 100644
--- a/bench/PremulAndUnpremulAlphaOpsBench.cpp
+++ b/bench/PremulAndUnpremulAlphaOpsBench.cpp
@@ -13,8 +13,7 @@
class PremulAndUnpremulAlphaOpsBench : public SkBenchmark {
public:
- PremulAndUnpremulAlphaOpsBench(void* param, SkCanvas::Config8888 config)
- : INHERITED(param) {
+ PremulAndUnpremulAlphaOpsBench(SkCanvas::Config8888 config) {
fUnPremulConfig = config;
fName.printf("premul_and_unpremul_alpha_%s",
(config == SkCanvas::kRGBA_Unpremul_Config8888) ?
@@ -60,14 +59,6 @@ private:
typedef SkBenchmark INHERITED;
};
-static SkBenchmark* fact0(void* p) {
- return new PremulAndUnpremulAlphaOpsBench(p,
- SkCanvas::kRGBA_Unpremul_Config8888);
-}
-static SkBenchmark* fact1(void* p) {
- return new PremulAndUnpremulAlphaOpsBench(p,
- SkCanvas::kNative_Unpremul_Config8888);
-}
-static BenchRegistry gReg0(fact0);
-static BenchRegistry gReg1(fact1);
+DEF_BENCH(return new PremulAndUnpremulAlphaOpsBench(SkCanvas::kRGBA_Unpremul_Config8888));
+DEF_BENCH(return new PremulAndUnpremulAlphaOpsBench(SkCanvas::kNative_Unpremul_Config8888));
« no previous file with comments | « bench/PictureRecordBench.cpp ('k') | bench/RTreeBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698