From 46020c4409490dc84e389d26509cf49ea0b9cdf7 Mon Sep 17 00:00:00 2001 From: Mike Klein Date: Mon, 11 Dec 2017 10:49:54 -0500 Subject: [PATCH] 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 Commit-Queue: Mike Klein --- gm/downsamplebitmap.cpp | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/gm/downsamplebitmap.cpp b/gm/downsamplebitmap.cpp index 377ba09df5..207c01fce3 100644 --- a/gm/downsamplebitmap.cpp +++ b/gm/downsamplebitmap.cpp @@ -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); )