Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(220)

Unified Diff: gm/mipmap.cpp

Issue 1333553002: GM: replace boilerplate with macros (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-09-09 (Wednesday) 11:01:10 EDT Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gm/matriximagefilter.cpp ('k') | gm/patch.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/mipmap.cpp
diff --git a/gm/mipmap.cpp b/gm/mipmap.cpp
index 4eb5c2aa3ca2be0c7cdc42725618011e8365cbde..b0b0cc487c8076de3188e2bca17600f734ff4e1e 100644
--- a/gm/mipmap.cpp
+++ b/gm/mipmap.cpp
@@ -28,7 +28,7 @@ static SkImage* make_image() {
return surface->newImageSnapshot();
}
-static void test_mip(SkCanvas* canvas) {
+DEF_SIMPLE_GM(mipmap, canvas, 400, 200) {
SkAutoTUnref<SkImage> img(make_image());//SkImage::NewFromEncoded(data));
SkPaint paint;
@@ -48,21 +48,3 @@ static void test_mip(SkCanvas* canvas) {
canvas->drawImage(img, 20, 20, nullptr);
}
-class MipMapGM : public skiagm::GM {
-public:
- MipMapGM() {}
-
-protected:
- SkString onShortName() override { return SkString("mipmap"); }
-
- SkISize onISize() override { return SkISize::Make(400, 200); }
-
- void onDraw(SkCanvas* canvas) override {
- test_mip(canvas);
- }
-
-private:
- typedef skiagm::GM INHERITED;
-};
-DEF_GM( return new MipMapGM; )
-
« no previous file with comments | « gm/matriximagefilter.cpp ('k') | gm/patch.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698