| 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 575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 586 if (SkPaint::kButt_Cap != capStyle && prevVerb == SkPath::kMove_
Verb) { | 586 if (SkPaint::kButt_Cap != capStyle && prevVerb == SkPath::kMove_
Verb) { |
| 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 #if !defined(SK_SUPPORT_LEGACY_HAIRLINE_END_CAP) | |
| 597 if (prevVerb == SkPath::kMove_Verb && | 596 if (prevVerb == SkPath::kMove_Verb && |
| 598 verb >= SkPath::kLine_Verb && verb <= SkPath::kCubic_Verb) { | 597 verb >= SkPath::kLine_Verb && verb <= SkPath::kCubic_Verb) { |
| 599 firstPt = pts[0]; // the curve moved the initial point, so clos
e to it instead | 598 firstPt = pts[0]; // the curve moved the initial point, so clos
e to it instead |
| 600 } | 599 } |
| 601 #endif | |
| 602 prevVerb = verb; | 600 prevVerb = verb; |
| 603 } | 601 } |
| 604 } | 602 } |
| 605 } | 603 } |
| 606 | 604 |
| 607 void SkScan::HairPath(const SkPath& path, const SkRasterClip& clip, SkBlitter* b
litter) { | 605 void SkScan::HairPath(const SkPath& path, const SkRasterClip& clip, SkBlitter* b
litter) { |
| 608 hair_path<SkPaint::kButt_Cap>(path, clip, blitter, SkScan::HairLineRgn); | 606 hair_path<SkPaint::kButt_Cap>(path, clip, blitter, SkScan::HairLineRgn); |
| 609 } | 607 } |
| 610 | 608 |
| 611 void SkScan::AntiHairPath(const SkPath& path, const SkRasterClip& clip, SkBlitte
r* blitter) { | 609 void SkScan::AntiHairPath(const SkPath& path, const SkRasterClip& clip, SkBlitte
r* blitter) { |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 698 | 696 |
| 699 SkAAClipBlitterWrapper wrap; | 697 SkAAClipBlitterWrapper wrap; |
| 700 if (!clip.quickContains(r.roundOut().makeOutset(1, 1))) { | 698 if (!clip.quickContains(r.roundOut().makeOutset(1, 1))) { |
| 701 wrap.init(clip, blitter); | 699 wrap.init(clip, blitter); |
| 702 blitter = wrap.getBlitter(); | 700 blitter = wrap.getBlitter(); |
| 703 clipRgn = &wrap.getRgn(); | 701 clipRgn = &wrap.getRgn(); |
| 704 } | 702 } |
| 705 AntiHairLineRgn(pts, count, clipRgn, blitter); | 703 AntiHairLineRgn(pts, count, clipRgn, blitter); |
| 706 } | 704 } |
| 707 } | 705 } |
| OLD | NEW |