| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #include "gm.h" | 8 #include "gm.h" |
| 9 #include "SkCanvas.h" | 9 #include "SkCanvas.h" |
| 10 #include "SkRRect.h" | 10 #include "SkRRect.h" |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 proc(rrect, d, d, &rr); | 119 proc(rrect, d, d, &rr); |
| 120 draw_rrect_color(canvas, rr); | 120 draw_rrect_color(canvas, rr); |
| 121 } | 121 } |
| 122 } | 122 } |
| 123 | 123 |
| 124 class RRectGM : public skiagm::GM { | 124 class RRectGM : public skiagm::GM { |
| 125 public: | 125 public: |
| 126 RRectGM() {} | 126 RRectGM() {} |
| 127 | 127 |
| 128 protected: | 128 protected: |
| 129 virtual uint32_t onGetFlags() const SK_OVERRIDE { |
| 130 return kSkipTiled_Flag; |
| 131 } |
| 132 |
| 129 virtual SkString onShortName() { | 133 virtual SkString onShortName() { |
| 130 return SkString("rrect"); | 134 return SkString("rrect"); |
| 131 } | 135 } |
| 132 | 136 |
| 133 virtual SkISize onISize() { | 137 virtual SkISize onISize() { |
| 134 return SkISize::Make(820, 710); | 138 return SkISize::Make(820, 710); |
| 135 } | 139 } |
| 136 | 140 |
| 137 virtual void onDraw(SkCanvas* canvas) { | 141 virtual void onDraw(SkCanvas* canvas) { |
| 138 static const InsetProc insetProcs[] = { | 142 static const InsetProc insetProcs[] = { |
| (...skipping 21 matching lines...) Expand all Loading... |
| 160 canvas->restore(); | 164 canvas->restore(); |
| 161 canvas->translate(0, 170); | 165 canvas->translate(0, 170); |
| 162 } | 166 } |
| 163 } | 167 } |
| 164 | 168 |
| 165 private: | 169 private: |
| 166 typedef GM INHERITED; | 170 typedef GM INHERITED; |
| 167 }; | 171 }; |
| 168 | 172 |
| 169 DEF_GM( return new RRectGM; ) | 173 DEF_GM( return new RRectGM; ) |
| OLD | NEW |