From ff26b7ea7cd57ab2c809c11986249b695d616d8c Mon Sep 17 00:00:00 2001 From: "reed@google.com" Date: Thu, 23 May 2013 17:04:19 +0000 Subject: [PATCH] use SK_OVERRIDE and DEF_GM BUG= Review URL: https://codereview.chromium.org/15873004 git-svn-id: http://skia.googlecode.com/svn/trunk@9259 2bbb7eff-a529-9590-31e7-b0007b416f81 --- gm/aaclip.cpp | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/gm/aaclip.cpp b/gm/aaclip.cpp index f9cecf4e42..f59f6aa2b3 100644 --- a/gm/aaclip.cpp +++ b/gm/aaclip.cpp @@ -148,8 +148,6 @@ static void test_mask() { } } -namespace skiagm { - /** Draw a 2px border around the target, then red behind the target; set the clip to match the target, then draw >> the target in blue. */ @@ -205,19 +203,19 @@ static void draw_rect_tests (SkCanvas* canvas) { border, with no red. */ -class AAClipGM : public GM { +class AAClipGM : public skiagm::GM { public: AAClipGM() { } protected: - virtual SkString onShortName() { + virtual SkString onShortName() SK_OVERRIDE { return SkString("aaclip"); } - virtual SkISize onISize() { - return make_isize(640, 480); + virtual SkISize onISize() SK_OVERRIDE { + return SkISize::Make(640, 480); } virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE { @@ -260,12 +258,7 @@ protected: virtual uint32_t onGetFlags() const { return kSkipPipe_Flag; } private: - typedef GM INHERITED; + typedef skiagm::GM INHERITED; }; -////////////////////////////////////////////////////////////////////////////// - -static GM* MyFactory(void*) { return new AAClipGM; } -static GMRegistry reg(MyFactory); - -} +DEF_GM( return SkNEW(AAClipGM); )