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

Unified Diff: gm/skbug1719.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/shadertext2.cpp ('k') | gm/smallarc.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/skbug1719.cpp
diff --git a/gm/skbug1719.cpp b/gm/skbug1719.cpp
index 0a75d353f4ef07eaea2528a8bbc993e73b1ee7a6..23c0c5fec06f7ba897863efeb185363025262cd6 100644
--- a/gm/skbug1719.cpp
+++ b/gm/skbug1719.cpp
@@ -10,8 +10,6 @@
#include "SkColorFilter.h"
#include "SkPath.h"
-namespace skiagm {
-
/**
* This test exercises bug 1719. An anti-aliased blurred path is rendered through a soft clip. On
* the GPU a scratch texture was used to hold the original path mask as well as the blurred path
@@ -20,26 +18,8 @@ namespace skiagm {
*
* The correct image should look like a thin stroked round rect.
*/
-class SkBug1719GM : public GM {
-public:
- SkBug1719GM() {}
-
-protected:
- SkString onShortName() override {
- return SkString("skbug1719");
- }
-
- SkISize onISize() override {
- return SkISize::Make(300, 100);
- }
-
- void onDrawBackground(SkCanvas* canvas) override {
- SkPaint bgPaint;
- bgPaint.setColor(sk_tool_utils::color_to_565(0xFF303030));
- canvas->drawPaint(bgPaint);
- }
-
- void onDraw(SkCanvas* canvas) override {
+DEF_SIMPLE_GM_BG(skbug1719, canvas, 300, 100,
+ sk_tool_utils::color_to_565(0xFF303030)) {
canvas->translate(SkIntToScalar(-800), SkIntToScalar(-650));
// The data is lifted from an SKP that exhibited the bug.
@@ -89,15 +69,4 @@ protected:
canvas->clipPath(clipPath, SkRegion::kIntersect_Op, true);
canvas->drawPath(drawPath, paint);
- }
-
-private:
-
- typedef GM INHERITED;
-};
-
-//////////////////////////////////////////////////////////////////////////////
-
-DEF_GM(return new SkBug1719GM;)
-
}
« no previous file with comments | « gm/shadertext2.cpp ('k') | gm/smallarc.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698