Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright 2006 The Android Open Source Project | 2 * Copyright 2006 The Android Open Source Project |
| 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 "SkScan.h" | 8 #include "SkScan.h" |
| 9 #include "SkBlitter.h" | 9 #include "SkBlitter.h" |
| 10 #include "SkRasterClip.h" | 10 #include "SkRasterClip.h" |
| (...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 464 case SkPath::kCubic_Verb: { | 464 case SkPath::kCubic_Verb: { |
| 465 if (SkPaint::kButt_Cap != capStyle) { | 465 if (SkPaint::kButt_Cap != capStyle) { |
| 466 extend_pts<capStyle>(prevVerb, iter.peek(), pts, 4); | 466 extend_pts<capStyle>(prevVerb, iter.peek(), pts, 4); |
| 467 } | 467 } |
| 468 haircubic(pts, clip, blitter, kMaxCubicSubdivideLevel, lineproc) ; | 468 haircubic(pts, clip, blitter, kMaxCubicSubdivideLevel, lineproc) ; |
| 469 lastPt = pts[3]; | 469 lastPt = pts[3]; |
| 470 } break; | 470 } break; |
| 471 case SkPath::kClose_Verb: | 471 case SkPath::kClose_Verb: |
| 472 pts[0] = lastPt; | 472 pts[0] = lastPt; |
| 473 pts[1] = firstPt; | 473 pts[1] = firstPt; |
| 474 if (SkPaint::kButt_Cap != capStyle && prevVerb == SkPath::kMove_ Verb) { | |
|
reed1
2015/12/16 14:55:57
maybe a comment saying we know what we're doing, t
caryclark
2015/12/16 15:26:56
Done.
| |
| 475 extend_pts<capStyle>(prevVerb, iter.peek(), pts, 2); | |
| 476 } | |
| 474 lineproc(pts, 2, clip, blitter); | 477 lineproc(pts, 2, clip, blitter); |
| 475 break; | 478 break; |
| 476 case SkPath::kDone_Verb: | 479 case SkPath::kDone_Verb: |
| 477 break; | 480 break; |
| 478 } | 481 } |
| 479 if (SkPaint::kButt_Cap != capStyle) { | 482 if (SkPaint::kButt_Cap != capStyle) { |
| 480 prevVerb = verb; | 483 prevVerb = verb; |
| 481 } | 484 } |
| 482 } | 485 } |
| 483 } | 486 } |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 576 | 579 |
| 577 SkAAClipBlitterWrapper wrap; | 580 SkAAClipBlitterWrapper wrap; |
| 578 if (!clip.quickContains(r.roundOut().makeOutset(1, 1))) { | 581 if (!clip.quickContains(r.roundOut().makeOutset(1, 1))) { |
| 579 wrap.init(clip, blitter); | 582 wrap.init(clip, blitter); |
| 580 blitter = wrap.getBlitter(); | 583 blitter = wrap.getBlitter(); |
| 581 clipRgn = &wrap.getRgn(); | 584 clipRgn = &wrap.getRgn(); |
| 582 } | 585 } |
| 583 AntiHairLineRgn(pts, count, clipRgn, blitter); | 586 AntiHairLineRgn(pts, count, clipRgn, blitter); |
| 584 } | 587 } |
| 585 } | 588 } |
| OLD | NEW |