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

Unified Diff: gm/aaclip.cpp

Issue 15873004: use SK_OVERRIDE and DEF_GM (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/aaclip.cpp
diff --git a/gm/aaclip.cpp b/gm/aaclip.cpp
index f9cecf4e420a21ae8ae060b278687b9255dc399c..f59f6aa2b34d11cecb39a4b6e02f53b2309874fe 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); )
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698