| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 #include "gm.h" | 8 #include "gm.h" |
| 9 #include "SkCanvas.h" | 9 #include "SkCanvas.h" |
| 10 #include "SkPaint.h" | 10 #include "SkPaint.h" |
| 11 #include "SkRandom.h" | 11 #include "SkRandom.h" |
| 12 | 12 |
| 13 namespace skiagm { | 13 namespace skiagm { |
| 14 | 14 |
| 15 class EmptyPathGM : public GM { | 15 class EmptyPathGM : public GM { |
| 16 public: | 16 public: |
| 17 EmptyPathGM() {} | 17 EmptyPathGM() {} |
| 18 | 18 |
| 19 protected: | 19 protected: |
| 20 SkString onShortName() { | 20 SkString onShortName() { |
| 21 return SkString("emptypath"); | 21 return SkString("emptypath"); |
| 22 } | 22 } |
| 23 | 23 |
| 24 SkISize onISize() { return make_isize(600, 280); } | 24 SkISize onISize() { return SkISize::Make(600, 280); } |
| 25 | 25 |
| 26 void drawEmpty(SkCanvas* canvas, | 26 void drawEmpty(SkCanvas* canvas, |
| 27 SkColor color, | 27 SkColor color, |
| 28 const SkRect& clip, | 28 const SkRect& clip, |
| 29 SkPaint::Style style, | 29 SkPaint::Style style, |
| 30 SkPath::FillType fill) { | 30 SkPath::FillType fill) { |
| 31 SkPath path; | 31 SkPath path; |
| 32 path.setFillType(fill); | 32 path.setFillType(fill); |
| 33 SkPaint paint; | 33 SkPaint paint; |
| 34 paint.setColor(color); | 34 paint.setColor(color); |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 private: | 124 private: |
| 125 typedef GM INHERITED; | 125 typedef GM INHERITED; |
| 126 }; | 126 }; |
| 127 | 127 |
| 128 ////////////////////////////////////////////////////////////////////////////// | 128 ////////////////////////////////////////////////////////////////////////////// |
| 129 | 129 |
| 130 static GM* MyFactory(void*) { return new EmptyPathGM; } | 130 static GM* MyFactory(void*) { return new EmptyPathGM; } |
| 131 static GMRegistry reg(MyFactory); | 131 static GMRegistry reg(MyFactory); |
| 132 | 132 |
| 133 } | 133 } |
| OLD | NEW |