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 "SkBitmap.h" | 8 #include "SkBitmap.h" |
9 #include "SkCanvas.h" | 9 #include "SkCanvas.h" |
10 #include "SkDashPathEffect.h" | 10 #include "SkDashPathEffect.h" |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 | 262 |
263 SkScalar intervals[] = { 0.5f, 0.5f }; | 263 SkScalar intervals[] = { 0.5f, 0.5f }; |
264 SkAutoTUnref<SkDashPathEffect> dash(SkDashPathEffect::Create(intervals, 2, 0
)); | 264 SkAutoTUnref<SkDashPathEffect> dash(SkDashPathEffect::Create(intervals, 2, 0
)); |
265 | 265 |
266 SkPaint paint; | 266 SkPaint paint; |
267 paint.setStyle(SkPaint::kStroke_Style); | 267 paint.setStyle(SkPaint::kStroke_Style); |
268 paint.setPathEffect(dash); | 268 paint.setPathEffect(dash); |
269 | 269 |
270 SkPath filteredPath; | 270 SkPath filteredPath; |
271 SkStrokeRec rec(paint); | 271 SkStrokeRec rec(paint); |
272 REPORTER_ASSERT(reporter, !dash->filterPath(&filteredPath, path, &rec, NULL)
); | 272 REPORTER_ASSERT(reporter, !dash->filterPath(&filteredPath, path, &rec, nullp
tr)); |
273 REPORTER_ASSERT(reporter, filteredPath.isEmpty()); | 273 REPORTER_ASSERT(reporter, filteredPath.isEmpty()); |
274 } | 274 } |
275 | 275 |
276 DEF_TEST(DrawPath, reporter) { | 276 DEF_TEST(DrawPath, reporter) { |
277 test_giantaa(); | 277 test_giantaa(); |
278 test_bug533(); | 278 test_bug533(); |
279 test_bigcubic(); | 279 test_bigcubic(); |
280 test_crbug_124652(); | 280 test_crbug_124652(); |
281 test_crbug_140642(); | 281 test_crbug_140642(); |
282 test_crbug_140803(); | 282 test_crbug_140803(); |
283 test_inversepathwithclip(); | 283 test_inversepathwithclip(); |
284 // why? | 284 // why? |
285 if (false) test_crbug131181(); | 285 if (false) test_crbug131181(); |
286 test_infinite_dash(reporter); | 286 test_infinite_dash(reporter); |
287 test_crbug_165432(reporter); | 287 test_crbug_165432(reporter); |
288 test_big_aa_rect(reporter); | 288 test_big_aa_rect(reporter); |
289 } | 289 } |
OLD | NEW |