OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 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 "SkRandom.h" | 9 #include "SkRandom.h" |
10 | 10 |
(...skipping 28 matching lines...) Expand all Loading... |
39 width *= width; | 39 width *= width; |
40 paint->setStrokeWidth(width); | 40 paint->setStrokeWidth(width); |
41 paint->setAlpha(0xFF); | 41 paint->setAlpha(0xFF); |
42 } | 42 } |
43 | 43 |
44 class BeziersGM : public skiagm::GM { | 44 class BeziersGM : public skiagm::GM { |
45 public: | 45 public: |
46 BeziersGM() {} | 46 BeziersGM() {} |
47 | 47 |
48 protected: | 48 protected: |
49 uint32_t onGetFlags() const SK_OVERRIDE { | |
50 return kSkipTiled_Flag; | |
51 } | |
52 | 49 |
53 SkString onShortName() SK_OVERRIDE { | 50 SkString onShortName() SK_OVERRIDE { |
54 return SkString("beziers"); | 51 return SkString("beziers"); |
55 } | 52 } |
56 | 53 |
57 SkISize onISize() SK_OVERRIDE { | 54 SkISize onISize() SK_OVERRIDE { |
58 return SkISize::Make(W, H*2); | 55 return SkISize::Make(W, H*2); |
59 } | 56 } |
60 | 57 |
61 void onDraw(SkCanvas* canvas) SK_OVERRIDE { | 58 void onDraw(SkCanvas* canvas) SK_OVERRIDE { |
(...skipping 15 matching lines...) Expand all Loading... |
77 canvas->drawPath(p, paint); | 74 canvas->drawPath(p, paint); |
78 } | 75 } |
79 } | 76 } |
80 | 77 |
81 private: | 78 private: |
82 typedef skiagm::GM INHERITED; | 79 typedef skiagm::GM INHERITED; |
83 }; | 80 }; |
84 | 81 |
85 static skiagm::GM* F0(void*) { return new BeziersGM; } | 82 static skiagm::GM* F0(void*) { return new BeziersGM; } |
86 static skiagm::GMRegistry R0(F0); | 83 static skiagm::GMRegistry R0(F0); |
OLD | NEW |