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 "SkPath.h" | 10 #include "SkPath.h" |
11 #include "SkParsePath.h" | 11 #include "SkParsePath.h" |
12 #include "SkDashPathEffect.h" | 12 #include "SkDashPathEffect.h" |
13 | 13 |
14 /* | 14 /* |
15 * Inspired by http://code.google.com/p/chromium/issues/detail?id=112145 | 15 * Inspired by http://code.google.com/p/chromium/issues/detail?id=112145 |
16 */ | 16 */ |
17 | 17 |
18 class DashCubicsGM : public skiagm::GM { | 18 class DashCubicsGM : public skiagm::GM { |
19 public: | 19 public: |
20 DashCubicsGM() {} | 20 DashCubicsGM() {} |
21 | 21 |
22 protected: | 22 protected: |
| 23 virtual uint32_t onGetFlags() const SK_OVERRIDE { |
| 24 return kSkipTiled_Flag; |
| 25 } |
| 26 |
23 virtual SkString onShortName() { | 27 virtual SkString onShortName() { |
24 return SkString("dashcubics"); | 28 return SkString("dashcubics"); |
25 } | 29 } |
26 | 30 |
27 virtual SkISize onISize() { | 31 virtual SkISize onISize() { |
28 return SkISize::Make(640, 480); | 32 return SkISize::Make(640, 480); |
29 } | 33 } |
30 | 34 |
31 virtual void onDraw(SkCanvas* canvas) { | 35 virtual void onDraw(SkCanvas* canvas) { |
32 SkPath path; | 36 SkPath path; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 } | 68 } |
65 | 69 |
66 private: | 70 private: |
67 typedef GM INHERITED; | 71 typedef GM INHERITED; |
68 }; | 72 }; |
69 | 73 |
70 ////////////////////////////////////////////////////////////////////////////// | 74 ////////////////////////////////////////////////////////////////////////////// |
71 | 75 |
72 static skiagm::GM* MyFactory(void*) { return new DashCubicsGM; } | 76 static skiagm::GM* MyFactory(void*) { return new DashCubicsGM; } |
73 static skiagm::GMRegistry reg(MyFactory); | 77 static skiagm::GMRegistry reg(MyFactory); |
OLD | NEW |