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 | 8 |
9 #include "gm.h" | 9 #include "gm.h" |
10 #include "SkCanvas.h" | 10 #include "SkCanvas.h" |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 paint.setColor(color); | 117 paint.setColor(color); |
118 | 118 |
119 SkRect r = SkRect::MakeLTRB(SkIntToScalar(90), SkIntToScalar(90), | 119 SkRect r = SkRect::MakeLTRB(SkIntToScalar(90), SkIntToScalar(90), |
120 SkIntToScalar(180), SkIntToScalar(180)); | 120 SkIntToScalar(180), SkIntToScalar(180)); |
121 | 121 |
122 canvas->drawRect(r, paint); | 122 canvas->drawRect(r, paint); |
123 | 123 |
124 canvas->restore(); | 124 canvas->restore(); |
125 } | 125 } |
126 | 126 |
| 127 virtual uint32_t onGetFlags() const SK_OVERRIDE { |
| 128 return kPath_GeomType == fGeomType ? kSkipTiled_Flag : 0; |
| 129 } |
| 130 |
127 virtual SkString onShortName() { | 131 virtual SkString onShortName() { |
128 SkString str; | 132 SkString str; |
129 str.printf("simpleaaclip_%s", | 133 str.printf("simpleaaclip_%s", |
130 kRect_GeomType == fGeomType ? "rect" : | 134 kRect_GeomType == fGeomType ? "rect" : |
131 (kPath_GeomType == fGeomType ? "path" : | 135 (kPath_GeomType == fGeomType ? "path" : |
132 "aaclip")); | 136 "aaclip")); |
133 return str; | 137 return str; |
134 } | 138 } |
135 | 139 |
136 virtual SkISize onISize() { | 140 virtual SkISize onISize() { |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 }; | 195 }; |
192 | 196 |
193 ////////////////////////////////////////////////////////////////////////////// | 197 ////////////////////////////////////////////////////////////////////////////// |
194 | 198 |
195 // rects | 199 // rects |
196 DEF_GM( return new SimpleClipGM(SimpleClipGM::kRect_GeomType); ) | 200 DEF_GM( return new SimpleClipGM(SimpleClipGM::kRect_GeomType); ) |
197 DEF_GM( return new SimpleClipGM(SimpleClipGM::kPath_GeomType); ) | 201 DEF_GM( return new SimpleClipGM(SimpleClipGM::kPath_GeomType); ) |
198 DEF_GM( return new SimpleClipGM(SimpleClipGM::kAAClip_GeomType); ) | 202 DEF_GM( return new SimpleClipGM(SimpleClipGM::kAAClip_GeomType); ) |
199 | 203 |
200 } | 204 } |
OLD | NEW |