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 | 8 |
9 #include "SkScanPriv.h" | 9 #include "SkScanPriv.h" |
10 #include "SkPath.h" | 10 #include "SkPath.h" |
(...skipping 732 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
743 SkAAClipBlitter aaBlitter; | 743 SkAAClipBlitter aaBlitter; |
744 | 744 |
745 tmp.setRect(clip.getBounds()); | 745 tmp.setRect(clip.getBounds()); |
746 aaBlitter.init(blitter, &clip.aaRgn()); | 746 aaBlitter.init(blitter, &clip.aaRgn()); |
747 SkScan::FillPath(path, tmp, &aaBlitter); | 747 SkScan::FillPath(path, tmp, &aaBlitter); |
748 } | 748 } |
749 } | 749 } |
750 | 750 |
751 void SkScan::AntiFillPath(const SkPath& path, const SkRasterClip& clip, | 751 void SkScan::AntiFillPath(const SkPath& path, const SkRasterClip& clip, |
752 SkBlitter* blitter) { | 752 SkBlitter* blitter) { |
| 753 if (GlobalAAConfig::getInstance().fUseAnalyticAA) { |
| 754 SkScan::AAAFillPath(path, clip, blitter); |
| 755 return; |
| 756 } |
| 757 |
753 if (clip.isEmpty()) { | 758 if (clip.isEmpty()) { |
754 return; | 759 return; |
755 } | 760 } |
756 | 761 |
757 if (clip.isBW()) { | 762 if (clip.isBW()) { |
758 AntiFillPath(path, clip.bwRgn(), blitter); | 763 AntiFillPath(path, clip.bwRgn(), blitter); |
759 } else { | 764 } else { |
760 SkRegion tmp; | 765 SkRegion tmp; |
761 SkAAClipBlitter aaBlitter; | 766 SkAAClipBlitter aaBlitter; |
762 | 767 |
763 tmp.setRect(clip.getBounds()); | 768 tmp.setRect(clip.getBounds()); |
764 aaBlitter.init(blitter, &clip.aaRgn()); | 769 aaBlitter.init(blitter, &clip.aaRgn()); |
765 SkScan::AntiFillPath(path, tmp, &aaBlitter, true); | 770 SkScan::AntiFillPath(path, tmp, &aaBlitter, true); |
766 } | 771 } |
767 } | 772 } |
OLD | NEW |