The downsamplebitmap_image GMs only use one image.
So there's no need to include the image name or path in the GM name. Change-Id: Idc510906ae77c5c73756f41bc13e859e231e9139 Reviewed-on: https://skia-review.googlesource.com/83320 Reviewed-by: Hal Canary <halcanary@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
This commit is contained in:
parent
2bbcda3071
commit
46020c4409
@ -160,18 +160,16 @@ class DownsampleBitmapCheckerboardGM: public DownsampleBitmapGM {
|
||||
|
||||
class DownsampleBitmapImageGM: public DownsampleBitmapGM {
|
||||
public:
|
||||
DownsampleBitmapImageGM(const char filename[], SkFilterQuality filterQuality)
|
||||
: INHERITED(filterQuality), fFilename(filename)
|
||||
{
|
||||
fName.printf("downsamplebitmap_image_%s_%s", this->filterQualityToString(), filename);
|
||||
}
|
||||
explicit DownsampleBitmapImageGM(SkFilterQuality filterQuality)
|
||||
: INHERITED(filterQuality) {
|
||||
fName.printf("downsamplebitmap_image_%s", this->filterQualityToString());
|
||||
}
|
||||
|
||||
protected:
|
||||
SkString fFilename;
|
||||
int fSize;
|
||||
|
||||
void make_bitmap() override {
|
||||
if (!GetResourceAsBitmap(fFilename.c_str(), &fBM)) {
|
||||
if (!GetResourceAsBitmap("images/mandrill_512.png", &fBM)) {
|
||||
fBM.allocN32Pixels(1, 1);
|
||||
fBM.eraseARGB(255, 255, 0 , 0); // red == bad
|
||||
}
|
||||
@ -183,16 +181,16 @@ class DownsampleBitmapImageGM: public DownsampleBitmapGM {
|
||||
|
||||
DEF_GM( return new DownsampleBitmapTextGM(72, kHigh_SkFilterQuality); )
|
||||
DEF_GM( return new DownsampleBitmapCheckerboardGM(512,256, kHigh_SkFilterQuality); )
|
||||
DEF_GM( return new DownsampleBitmapImageGM("images/mandrill_512.png", kHigh_SkFilterQuality); )
|
||||
DEF_GM( return new DownsampleBitmapImageGM(kHigh_SkFilterQuality); )
|
||||
|
||||
DEF_GM( return new DownsampleBitmapTextGM(72, kMedium_SkFilterQuality); )
|
||||
DEF_GM( return new DownsampleBitmapCheckerboardGM(512,256, kMedium_SkFilterQuality); )
|
||||
DEF_GM( return new DownsampleBitmapImageGM("images/mandrill_512.png", kMedium_SkFilterQuality); )
|
||||
DEF_GM( return new DownsampleBitmapImageGM(kMedium_SkFilterQuality); )
|
||||
|
||||
DEF_GM( return new DownsampleBitmapTextGM(72, kLow_SkFilterQuality); )
|
||||
DEF_GM( return new DownsampleBitmapCheckerboardGM(512,256, kLow_SkFilterQuality); )
|
||||
DEF_GM( return new DownsampleBitmapImageGM("images/mandrill_512.png", kLow_SkFilterQuality); )
|
||||
DEF_GM( return new DownsampleBitmapImageGM(kLow_SkFilterQuality); )
|
||||
|
||||
DEF_GM( return new DownsampleBitmapTextGM(72, kNone_SkFilterQuality); )
|
||||
DEF_GM( return new DownsampleBitmapCheckerboardGM(512,256, kNone_SkFilterQuality); )
|
||||
DEF_GM( return new DownsampleBitmapImageGM("images/mandrill_512.png", kNone_SkFilterQuality); )
|
||||
DEF_GM( return new DownsampleBitmapImageGM(kNone_SkFilterQuality); )
|
||||
|
Loading…
Reference in New Issue
Block a user