| 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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 virtual SkString onShortName() { | 131 virtual SkString onShortName() { |
| 132 SkString str; | 132 SkString str; |
| 133 str.printf("simpleaaclip_%s", | 133 str.printf("simpleaaclip_%s", |
| 134 kRect_GeomType == fGeomType ? "rect" : | 134 kRect_GeomType == fGeomType ? "rect" : |
| 135 (kPath_GeomType == fGeomType ? "path" : | 135 (kPath_GeomType == fGeomType ? "path" : |
| 136 "aaclip")); | 136 "aaclip")); |
| 137 return str; | 137 return str; |
| 138 } | 138 } |
| 139 | 139 |
| 140 virtual SkISize onISize() { | 140 virtual SkISize onISize() { |
| 141 return make_isize(640, 480); | 141 return SkISize::Make(640, 480); |
| 142 } | 142 } |
| 143 | 143 |
| 144 virtual void onDraw(SkCanvas* canvas) { | 144 virtual void onDraw(SkCanvas* canvas) { |
| 145 | 145 |
| 146 static const struct { | 146 static const struct { |
| 147 SkColor fColor; | 147 SkColor fColor; |
| 148 const char* fName; | 148 const char* fName; |
| 149 SkRegion::Op fOp; | 149 SkRegion::Op fOp; |
| 150 } gOps[] = { | 150 } gOps[] = { |
| 151 { SK_ColorBLACK, "Difference", SkRegion::kDifference_Op }, | 151 { SK_ColorBLACK, "Difference", SkRegion::kDifference_Op }, |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 }; | 195 }; |
| 196 | 196 |
| 197 ////////////////////////////////////////////////////////////////////////////// | 197 ////////////////////////////////////////////////////////////////////////////// |
| 198 | 198 |
| 199 // rects | 199 // rects |
| 200 DEF_GM( return new SimpleClipGM(SimpleClipGM::kRect_GeomType); ) | 200 DEF_GM( return new SimpleClipGM(SimpleClipGM::kRect_GeomType); ) |
| 201 DEF_GM( return new SimpleClipGM(SimpleClipGM::kPath_GeomType); ) | 201 DEF_GM( return new SimpleClipGM(SimpleClipGM::kPath_GeomType); ) |
| 202 DEF_GM( return new SimpleClipGM(SimpleClipGM::kAAClip_GeomType); ) | 202 DEF_GM( return new SimpleClipGM(SimpleClipGM::kAAClip_GeomType); ) |
| 203 | 203 |
| 204 } | 204 } |
| OLD | NEW |