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)); |