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 "SkMathPriv.h" | 10 #include "SkMathPriv.h" |
(...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
576 case SkPath::kCubic_Verb: { | 576 case SkPath::kCubic_Verb: { |
577 if (SkPaint::kButt_Cap != capStyle) { | 577 if (SkPaint::kButt_Cap != capStyle) { |
578 extend_pts<capStyle>(prevVerb, iter.peek(), pts, 4); | 578 extend_pts<capStyle>(prevVerb, iter.peek(), pts, 4); |
579 } | 579 } |
580 haircubic(pts, clip, insetClip, outsetClip, blitter, kMaxCubicSu
bdivideLevel, lineproc); | 580 haircubic(pts, clip, insetClip, outsetClip, blitter, kMaxCubicSu
bdivideLevel, lineproc); |
581 lastPt = pts[3]; | 581 lastPt = pts[3]; |
582 } break; | 582 } break; |
583 case SkPath::kClose_Verb: | 583 case SkPath::kClose_Verb: |
584 pts[0] = lastPt; | 584 pts[0] = lastPt; |
585 pts[1] = firstPt; | 585 pts[1] = firstPt; |
586 if (SkPaint::kButt_Cap != capStyle && prevVerb == SkPath::kMove_
Verb) { | 586 if (SkPaint::kButt_Cap != capStyle) { |
587 // cap moveTo/close to match svg expectations for degenerate
segments | 587 // cap moveTo/close to match svg expectations for degenerate
segments |
588 extend_pts<capStyle>(prevVerb, iter.peek(), pts, 2); | 588 extend_pts<capStyle>(prevVerb, iter.peek(), pts, 2); |
589 } | 589 } |
590 lineproc(pts, 2, clip, blitter); | 590 lineproc(pts, 2, clip, blitter); |
591 break; | 591 break; |
592 case SkPath::kDone_Verb: | 592 case SkPath::kDone_Verb: |
593 break; | 593 break; |
594 } | 594 } |
595 if (SkPaint::kButt_Cap != capStyle) { | 595 if (SkPaint::kButt_Cap != capStyle) { |
596 prevVerb = verb; | 596 prevVerb = verb; |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
692 | 692 |
693 SkAAClipBlitterWrapper wrap; | 693 SkAAClipBlitterWrapper wrap; |
694 if (!clip.quickContains(r.roundOut().makeOutset(1, 1))) { | 694 if (!clip.quickContains(r.roundOut().makeOutset(1, 1))) { |
695 wrap.init(clip, blitter); | 695 wrap.init(clip, blitter); |
696 blitter = wrap.getBlitter(); | 696 blitter = wrap.getBlitter(); |
697 clipRgn = &wrap.getRgn(); | 697 clipRgn = &wrap.getRgn(); |
698 } | 698 } |
699 AntiHairLineRgn(pts, count, clipRgn, blitter); | 699 AntiHairLineRgn(pts, count, clipRgn, blitter); |
700 } | 700 } |
701 } | 701 } |
OLD | NEW |