| 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 "SkTArray.h" | 10 #include "SkTArray.h" |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 kYStart + SK_Scalar1 * kYStep * i + 3 * SK_Scalar1
/ 4 + | 275 kYStart + SK_Scalar1 * kYStep * i + 3 * SK_Scalar1
/ 4 + |
| 276 SK_ScalarHalf * kYStep); | 276 SK_ScalarHalf * kYStep); |
| 277 | 277 |
| 278 SkColor color = genColor(&rand); | 278 SkColor color = genColor(&rand); |
| 279 fPaints[i].setColor(color); | 279 fPaints[i].setColor(color); |
| 280 fPaints[i].setShader(shader); | 280 fPaints[i].setShader(shader); |
| 281 | 281 |
| 282 canvas->drawRect(rect, rectPaint); | 282 canvas->drawRect(rect, rectPaint); |
| 283 canvas->drawRRect(circleRect, fPaints[i]); | 283 canvas->drawRRect(circleRect, fPaints[i]); |
| 284 | 284 |
| 285 fPaints[i].setShader(NULL); | 285 fPaints[i].setShader(nullptr); |
| 286 | 286 |
| 287 canvas->restore(); | 287 canvas->restore(); |
| 288 } | 288 } |
| 289 | 289 |
| 290 // strokes and radii | 290 // strokes and radii |
| 291 { | 291 { |
| 292 SkScalar radii[][2] = { | 292 SkScalar radii[][2] = { |
| 293 {10,10}, | 293 {10,10}, |
| 294 {5,15}, | 294 {5,15}, |
| 295 {5,15}, | 295 {5,15}, |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 | 331 |
| 332 typedef GM INHERITED; | 332 typedef GM INHERITED; |
| 333 }; | 333 }; |
| 334 | 334 |
| 335 ////////////////////////////////////////////////////////////////////////////// | 335 ////////////////////////////////////////////////////////////////////////////// |
| 336 | 336 |
| 337 static GM* MyFactory(void*) { return new RoundRectGM; } | 337 static GM* MyFactory(void*) { return new RoundRectGM; } |
| 338 static GMRegistry reg(MyFactory); | 338 static GMRegistry reg(MyFactory); |
| 339 | 339 |
| 340 } | 340 } |
| OLD | NEW |