reenable the scale benchmark, and only bench actual canvas draw commands

instead of direct invocations of the (now private) bitmap scale method

BUG=
R=reed@google.com

Review URL: https://codereview.chromium.org/18941009

git-svn-id: http://skia.googlecode.com/svn/trunk@10027 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
humper@google.com 2013-07-11 20:28:30 +00:00
parent 0a5699ee48
commit 523521c6bc
2 changed files with 8 additions and 27 deletions

View File

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

View File

@ -9,6 +9,7 @@
'../bench/BicubicBench.cpp',
'../bench/BitmapBench.cpp',
'../bench/BitmapRectBench.cpp',
'../bench/BitmapScaleBench.cpp',
'../bench/BlendBench.cpp',
'../bench/BlurBench.cpp',
'../bench/BlurImageFilterBench.cpp',