| 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 | |
| 131 virtual SkString onShortName() { | 127 virtual SkString onShortName() { |
| 132 SkString str; | 128 SkString str; |
| 133 str.printf("simpleaaclip_%s", | 129 str.printf("simpleaaclip_%s", |
| 134 kRect_GeomType == fGeomType ? "rect" : | 130 kRect_GeomType == fGeomType ? "rect" : |
| 135 (kPath_GeomType == fGeomType ? "path" : | 131 (kPath_GeomType == fGeomType ? "path" : |
| 136 "aaclip")); | 132 "aaclip")); |
| 137 return str; | 133 return str; |
| 138 } | 134 } |
| 139 | 135 |
| 140 virtual SkISize onISize() { | 136 virtual SkISize onISize() { |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 }; | 191 }; |
| 196 | 192 |
| 197 ////////////////////////////////////////////////////////////////////////////// | 193 ////////////////////////////////////////////////////////////////////////////// |
| 198 | 194 |
| 199 // rects | 195 // rects |
| 200 DEF_GM( return new SimpleClipGM(SimpleClipGM::kRect_GeomType); ) | 196 DEF_GM( return new SimpleClipGM(SimpleClipGM::kRect_GeomType); ) |
| 201 DEF_GM( return new SimpleClipGM(SimpleClipGM::kPath_GeomType); ) | 197 DEF_GM( return new SimpleClipGM(SimpleClipGM::kPath_GeomType); ) |
| 202 DEF_GM( return new SimpleClipGM(SimpleClipGM::kAAClip_GeomType); ) | 198 DEF_GM( return new SimpleClipGM(SimpleClipGM::kAAClip_GeomType); ) |
| 203 | 199 |
| 204 } | 200 } |
| OLD | NEW |