aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm
diff options
context:
space:
mode:
authorGravatar Mike Klein <mtklein@chromium.org>2017-12-11 10:49:54 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-12-11 16:38:58 +0000
commit46020c4409490dc84e389d26509cf49ea0b9cdf7 (patch)
treeda2d9e90468e14da25e8a6972e13d4b365f611fb /gm
parent2bbcda3071a2656612fa5a8bc8ab12335ef98aa2 (diff)
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>
Diffstat (limited to 'gm')
-rw-r--r--gm/downsamplebitmap.cpp20
1 files 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); )