aboutsummaryrefslogtreecommitdiffhomepage
path: root/bench/BitmapScaleBench.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'bench/BitmapScaleBench.cpp')
-rw-r--r--bench/BitmapScaleBench.cpp34
1 files changed, 7 insertions, 27 deletions
diff --git a/bench/BitmapScaleBench.cpp b/bench/BitmapScaleBench.cpp
index 14d9fc0f34..561e0968ff 100644
--- a/bench/BitmapScaleBench.cpp
+++ b/bench/BitmapScaleBench.cpp
@@ -24,7 +24,7 @@ public:
fInputSize = is;
fOutputSize = os;
- fLoopCount = 100;
+ fLoopCount = 20;
}
protected:
@@ -104,32 +104,12 @@ private:
typedef BitmapScaleBench INHERITED;
};
-class BitmapDirectScaleBench: public BitmapScaleBench {
- public:
- BitmapDirectScaleBench(void *param, int is, int os) : INHERITED(param, is, os) {
- setName( "direct" );
- }
-protected:
- virtual void doScaleImage() SK_OVERRIDE {
- fInputBitmap.scale( &fOutputBitmap );
- }
-private:
- typedef BitmapScaleBench INHERITED;
-};
-
-
DEF_BENCH(return new BitmapFilterScaleBench(p, 10, 90);)
DEF_BENCH(return new BitmapFilterScaleBench(p, 30, 90);)
DEF_BENCH(return new BitmapFilterScaleBench(p, 80, 90);)
-// DEF_BENCH(return new BitmapFilterScaleBench(p, 90, 90);)
-// DEF_BENCH(return new BitmapFilterScaleBench(p, 90, 80);)
-// DEF_BENCH(return new BitmapFilterScaleBench(p, 90, 30);)
-// DEF_BENCH(return new BitmapFilterScaleBench(p, 90, 10);)
-
-DEF_BENCH(return new BitmapDirectScaleBench(p, 10, 90);)
-DEF_BENCH(return new BitmapDirectScaleBench(p, 30, 90);)
-DEF_BENCH(return new BitmapDirectScaleBench(p, 80, 90);)
-// DEF_BENCH(return new BitmapDirectScaleBench(p, 90, 90);)
-// DEF_BENCH(return new BitmapDirectScaleBench(p, 90, 80);)
-// DEF_BENCH(return new BitmapDirectScaleBench(p, 90, 30);)
-// DEF_BENCH(return new BitmapDirectScaleBench(p, 90, 10);)
+DEF_BENCH(return new BitmapFilterScaleBench(p, 90, 90);)
+DEF_BENCH(return new BitmapFilterScaleBench(p, 90, 80);)
+DEF_BENCH(return new BitmapFilterScaleBench(p, 90, 30);)
+DEF_BENCH(return new BitmapFilterScaleBench(p, 90, 10);)
+DEF_BENCH(return new BitmapFilterScaleBench(p, 256, 64);)
+DEF_BENCH(return new BitmapFilterScaleBench(p, 64, 256);)