| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2011 The Android Open Source Project | 3 * Copyright 2011 The Android Open Source Project |
| 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 | 9 |
| 10 #include "SkScan.h" | 10 #include "SkScan.h" |
| (...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 581 istart += 1; | 581 istart += 1; |
| 582 int fullSpans = istop - istart - (scaleStop > 0); | 582 int fullSpans = istop - istart - (scaleStop > 0); |
| 583 if (fullSpans > 0) { | 583 if (fullSpans > 0) { |
| 584 fstart = hairBlitter->drawLine(istart, istart + fullSpans, fstart, slope
); | 584 fstart = hairBlitter->drawLine(istart, istart + fullSpans, fstart, slope
); |
| 585 } | 585 } |
| 586 if (scaleStop > 0) { | 586 if (scaleStop > 0) { |
| 587 hairBlitter->drawCap(istop - 1, fstart, slope, scaleStop); | 587 hairBlitter->drawCap(istop - 1, fstart, slope, scaleStop); |
| 588 } | 588 } |
| 589 } | 589 } |
| 590 | 590 |
| 591 void SkScan::AntiHairLineRgn(const SkPoint& pt0, const SkPoint& pt1, | 591 void SkScan::AntiHairLineRgn(SkPoint pt0, SkPoint pt1, const SkRegion* clip, SkB
litter* blitter) { |
| 592 const SkRegion* clip, SkBlitter* blitter) { | |
| 593 if (clip && clip->isEmpty()) { | 592 if (clip && clip->isEmpty()) { |
| 594 return; | 593 return; |
| 595 } | 594 } |
| 596 | 595 |
| 597 SkASSERT(clip == NULL || !clip->getBounds().isEmpty()); | 596 SkASSERT(clip == NULL || !clip->getBounds().isEmpty()); |
| 598 | 597 |
| 599 #ifdef TEST_GAMMA | 598 #ifdef TEST_GAMMA |
| 600 build_gamma_table(); | 599 build_gamma_table(); |
| 601 #endif | 600 #endif |
| 602 | 601 |
| (...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1065 | 1064 |
| 1066 void SkScan::AntiFrameRect(const SkRect& r, const SkPoint& strokeSize, | 1065 void SkScan::AntiFrameRect(const SkRect& r, const SkPoint& strokeSize, |
| 1067 const SkRasterClip& clip, SkBlitter* blitter) { | 1066 const SkRasterClip& clip, SkBlitter* blitter) { |
| 1068 if (clip.isBW()) { | 1067 if (clip.isBW()) { |
| 1069 AntiFrameRect(r, strokeSize, &clip.bwRgn(), blitter); | 1068 AntiFrameRect(r, strokeSize, &clip.bwRgn(), blitter); |
| 1070 } else { | 1069 } else { |
| 1071 SkAAClipBlitterWrapper wrap(clip, blitter); | 1070 SkAAClipBlitterWrapper wrap(clip, blitter); |
| 1072 AntiFrameRect(r, strokeSize, &wrap.getRgn(), wrap.getBlitter()); | 1071 AntiFrameRect(r, strokeSize, &wrap.getRgn(), wrap.getBlitter()); |
| 1073 } | 1072 } |
| 1074 } | 1073 } |
| OLD | NEW |