Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(514)

Side by Side Diff: src/core/SkScan_AntiPath.cpp

Issue 2221103002: Analytic AntiAlias for Convex Shapes (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Make alpha computation cleaner and faster Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« src/core/SkEdge.cpp ('K') | « src/core/SkScan_AAAPath.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 733 matching lines...) Expand 10 before | Expand all | Expand 10 after
744 SkAAClipBlitter aaBlitter; 744 SkAAClipBlitter aaBlitter;
745 745
746 tmp.setRect(clip.getBounds()); 746 tmp.setRect(clip.getBounds());
747 aaBlitter.init(blitter, &clip.aaRgn()); 747 aaBlitter.init(blitter, &clip.aaRgn());
748 SkScan::FillPath(path, tmp, &aaBlitter); 748 SkScan::FillPath(path, tmp, &aaBlitter);
749 } 749 }
750 } 750 }
751 751
752 void SkScan::AntiFillPath(const SkPath& path, const SkRasterClip& clip, 752 void SkScan::AntiFillPath(const SkPath& path, const SkRasterClip& clip,
753 SkBlitter* blitter) { 753 SkBlitter* blitter) {
754 if (GlobalAAConfig::getInstance().fUseAnalyticAA) {
755 SkScan::AAAFillPath(path, clip, blitter);
756 return;
757 }
758
754 if (clip.isEmpty()) { 759 if (clip.isEmpty()) {
755 return; 760 return;
756 } 761 }
757 762
758 if (clip.isBW()) { 763 if (clip.isBW()) {
759 AntiFillPath(path, clip.bwRgn(), blitter); 764 AntiFillPath(path, clip.bwRgn(), blitter);
760 } else { 765 } else {
761 SkRegion tmp; 766 SkRegion tmp;
762 SkAAClipBlitter aaBlitter; 767 SkAAClipBlitter aaBlitter;
763 768
764 tmp.setRect(clip.getBounds()); 769 tmp.setRect(clip.getBounds());
765 aaBlitter.init(blitter, &clip.aaRgn()); 770 aaBlitter.init(blitter, &clip.aaRgn());
766 SkScan::AntiFillPath(path, tmp, &aaBlitter, true); 771 SkScan::AntiFillPath(path, tmp, &aaBlitter, true);
767 } 772 }
768 } 773 }
OLDNEW
« src/core/SkEdge.cpp ('K') | « src/core/SkScan_AAAPath.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698