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 "SkBlurMask.h" | 10 #include "SkBlurMask.h" |
11 #include "SkBlurMaskFilter.h" | 11 #include "SkBlurMaskFilter.h" |
12 | 12 |
13 namespace skiagm { | 13 namespace skiagm { |
14 | 14 |
15 // This GM exercises the blurred rect nine-patching special cases when the | 15 // This GM exercises the blurred rect nine-patching special cases when the |
16 // blurred rect is very large and/or very far from the origin. | 16 // blurred rect is very large and/or very far from the origin. |
17 // It creates a large blurred rect/rectori then renders the 4 corners and the | 17 // It creates a large blurred rect/rectori then renders the 4 corners and the |
18 // middle. | 18 // middle. |
19 class BigBlursGM : public GM { | 19 class BigBlursGM : public GM { |
20 public: | 20 public: |
21 BigBlursGM() { | 21 BigBlursGM() { |
22 this->setBGColor(sk_tool_utils::color_to_565(0xFFDDDDDD)); | 22 this->setBGColor(0xFFDDDDDD); |
23 } | 23 } |
24 | 24 |
25 protected: | 25 protected: |
26 SkString onShortName() override { | 26 SkString onShortName() override { |
27 return SkString("bigblurs"); | 27 return SkString("bigblurs"); |
28 } | 28 } |
29 | 29 |
30 SkISize onISize() override { | 30 SkISize onISize() override { |
31 return SkISize::Make(kWidth, kHeight); | 31 return SkISize::Make(kWidth, kHeight); |
32 } | 32 } |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 static const int kCloseUpSize = 64; | 107 static const int kCloseUpSize = 64; |
108 static const int kWidth = 5 * kCloseUpSize; | 108 static const int kWidth = 5 * kCloseUpSize; |
109 static const int kHeight = 2 * (kLastEnum_SkBlurStyle + 1) * kCloseUpSize; | 109 static const int kHeight = 2 * (kLastEnum_SkBlurStyle + 1) * kCloseUpSize; |
110 | 110 |
111 typedef GM INHERITED; | 111 typedef GM INHERITED; |
112 }; | 112 }; |
113 | 113 |
114 DEF_GM( return SkNEW(BigBlursGM); ) | 114 DEF_GM( return SkNEW(BigBlursGM); ) |
115 | 115 |
116 } | 116 } |
OLD | NEW |