aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/shapes.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gm/shapes.cpp')
-rw-r--r--gm/shapes.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/gm/shapes.cpp b/gm/shapes.cpp
index c746a493df..0b01390796 100644
--- a/gm/shapes.cpp
+++ b/gm/shapes.cpp
@@ -19,6 +19,15 @@ namespace skiagm {
class ShapesGM : public GM {
protected:
ShapesGM(const char* name, bool antialias) : fName(name), fAntialias(antialias) {
+ if (!antialias) {
+ fName.append("_bw");
+ }
+ }
+
+ SkString onShortName() override final { return fName; }
+ SkISize onISize() override { return SkISize::Make(500, 500); }
+
+ void onOnceBeforeDraw() override {
fShapes.push_back().setOval(SkRect::MakeXYWH(-5, 25, 200, 100));
fRotations.push_back(21);
@@ -50,15 +59,6 @@ protected:
fShapes.push_back().setRectRadii(SkRect::MakeXYWH(180, -30, 80, 60), radii2);
fRotations.push_back(295);
- if (!antialias) {
- fName.append("_bw");
- }
- }
-
- SkString onShortName() override final { return fName; }
- SkISize onISize() override { return SkISize::Make(500, 500); }
-
- void onOnceBeforeDraw() override {
fPaint.setAntiAlias(fAntialias);
}