| 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 #include "gm.h" | 8 #include "gm.h" |
| 9 #include "SkCanvas.h" | 9 #include "SkCanvas.h" |
| 10 #include "SkShader.h" | 10 #include "SkShader.h" |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 | 108 |
| 109 SkRect temp; | 109 SkRect temp; |
| 110 temp.set(SkIntToScalar(115), | 110 temp.set(SkIntToScalar(115), |
| 111 SkIntToScalar(75), | 111 SkIntToScalar(75), |
| 112 SkIntToScalar(144), | 112 SkIntToScalar(144), |
| 113 SkIntToScalar(110)); | 113 SkIntToScalar(110)); |
| 114 | 114 |
| 115 SkPath path; | 115 SkPath path; |
| 116 path.addRoundRect(temp, SkIntToScalar(5), SkIntToScalar(5)); | 116 path.addRoundRect(temp, SkIntToScalar(5), SkIntToScalar(5)); |
| 117 | 117 |
| 118 canvas->clipPath(path, SkRegion::kReplace_Op, true); // AA is on | 118 canvas->legacyClipPath(path, SkRegion::kReplace_Op, true); // AA is on |
| 119 | 119 |
| 120 canvas->drawText("M", 1, | 120 canvas->drawText("M", 1, |
| 121 SkIntToScalar(100), SkIntToScalar(100), | 121 SkIntToScalar(100), SkIntToScalar(100), |
| 122 paint); | 122 paint); |
| 123 | 123 |
| 124 canvas->restore(); | 124 canvas->restore(); |
| 125 | 125 |
| 126 // Now draw stroked versions of the "M" and the round rect so we can | 126 // Now draw stroked versions of the "M" and the round rect so we can |
| 127 // see what is going on | 127 // see what is going on |
| 128 SkPaint paint2; | 128 SkPaint paint2; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 148 | 148 |
| 149 typedef GM INHERITED; | 149 typedef GM INHERITED; |
| 150 }; | 150 }; |
| 151 | 151 |
| 152 ////////////////////////////////////////////////////////////////////////////// | 152 ////////////////////////////////////////////////////////////////////////////// |
| 153 | 153 |
| 154 static GM* MyFactory(void*) { return new SamplerStressGM; } | 154 static GM* MyFactory(void*) { return new SamplerStressGM; } |
| 155 static GMRegistry reg(MyFactory); | 155 static GMRegistry reg(MyFactory); |
| 156 | 156 |
| 157 } | 157 } |
| OLD | NEW |