OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2013 Google Inc. | 3 * Copyright 2013 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 | 8 |
9 #include "gm.h" | 9 #include "gm.h" |
10 #include "SkTArray.h" | 10 #include "SkTArray.h" |
11 #include "SkRandom.h" | 11 #include "SkRandom.h" |
12 #include "SkMatrix.h" | 12 #include "SkMatrix.h" |
13 #include "SkBlurMaskFilter.h" | 13 #include "SkBlurMaskFilter.h" |
14 #include "SkGradientShader.h" | 14 #include "SkGradientShader.h" |
15 #include "SkBlurDrawLooper.h" | 15 #include "SkBlurDrawLooper.h" |
16 #include "SkRect.h" | 16 #include "SkRect.h" |
17 #include "SkRRect.h" | 17 #include "SkRRect.h" |
18 | 18 |
19 namespace skiagm { | 19 namespace skiagm { |
20 | 20 |
21 class RoundRectGM : public GM { | 21 class RoundRectGM : public GM { |
22 public: | 22 public: |
23 RoundRectGM() { | 23 RoundRectGM() { |
24 this->setBGColor(0xFF000000); | 24 this->setBGColor(0xFF000000); |
25 this->makePaints(); | 25 this->makePaints(); |
26 this->makeMatrices(); | 26 this->makeMatrices(); |
27 } | 27 } |
28 | 28 |
29 protected: | 29 protected: |
30 uint32_t onGetFlags() const SK_OVERRIDE { | |
31 return kSkipTiled_Flag; | |
32 } | |
33 | 30 |
34 SkString onShortName() SK_OVERRIDE { | 31 SkString onShortName() SK_OVERRIDE { |
35 return SkString("roundrects"); | 32 return SkString("roundrects"); |
36 } | 33 } |
37 | 34 |
38 SkISize onISize() SK_OVERRIDE { | 35 SkISize onISize() SK_OVERRIDE { |
39 return SkISize::Make(1200, 900); | 36 return SkISize::Make(1200, 900); |
40 } | 37 } |
41 | 38 |
42 void makePaints() { | 39 void makePaints() { |
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
334 | 331 |
335 typedef GM INHERITED; | 332 typedef GM INHERITED; |
336 }; | 333 }; |
337 | 334 |
338 ////////////////////////////////////////////////////////////////////////////// | 335 ////////////////////////////////////////////////////////////////////////////// |
339 | 336 |
340 static GM* MyFactory(void*) { return new RoundRectGM; } | 337 static GM* MyFactory(void*) { return new RoundRectGM; } |
341 static GMRegistry reg(MyFactory); | 338 static GMRegistry reg(MyFactory); |
342 | 339 |
343 } | 340 } |
OLD | NEW |