| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2016 The Android Open Source Project | 2 * Copyright 2016 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 "SkAntiRun.h" | 8 #include "SkAntiRun.h" |
| 9 #include "SkBlitter.h" | 9 #include "SkBlitter.h" |
| 10 #include "SkEdge.h" | 10 #include "SkEdge.h" |
| (...skipping 1114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1125 #endif | 1125 #endif |
| 1126 } | 1126 } |
| 1127 | 1127 |
| 1128 void SkScan::aaa_fill_path(const SkPath& path, const SkIRect* clipRect, Additive
Blitter* blitter, | 1128 void SkScan::aaa_fill_path(const SkPath& path, const SkIRect* clipRect, Additive
Blitter* blitter, |
| 1129 int start_y, int stop_y, const SkRegion& clipRgn, bool isUsin
gMask, | 1129 int start_y, int stop_y, const SkRegion& clipRgn, bool isUsin
gMask, |
| 1130 bool forceRLE) { // forceRLE implies that SkAAClip is calling
us | 1130 bool forceRLE) { // forceRLE implies that SkAAClip is calling
us |
| 1131 SkASSERT(blitter); | 1131 SkASSERT(blitter); |
| 1132 | 1132 |
| 1133 if (path.isInverseFillType() || !path.isConvex()) { | 1133 if (path.isInverseFillType() || !path.isConvex()) { |
| 1134 // fall back to supersampling AA | 1134 // fall back to supersampling AA |
| 1135 SkScan::AntiFillPath(path, clipRgn, blitter->getRealBlitter(true), false
); | 1135 SkScan::AntiFillPath(path, clipRgn, blitter->getRealBlitter(true), force
RLE); |
| 1136 return; | 1136 return; |
| 1137 } | 1137 } |
| 1138 | 1138 |
| 1139 SkEdgeBuilder builder; | 1139 SkEdgeBuilder builder; |
| 1140 | 1140 |
| 1141 // If we're convex, then we need both edges, even the right edge is past the
clip | 1141 // If we're convex, then we need both edges, even the right edge is past the
clip |
| 1142 const bool canCullToTheRight = !path.isConvex(); | 1142 const bool canCullToTheRight = !path.isConvex(); |
| 1143 | 1143 |
| 1144 SkASSERT(gSkUseAnalyticAA.load()); | 1144 SkASSERT(gSkUseAnalyticAA.load()); |
| 1145 int count = builder.build(path, clipRect, 0, canCullToTheRight, true); | 1145 int count = builder.build(path, clipRect, 0, canCullToTheRight, true); |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1306 AAAFillPath(path, clip.bwRgn(), blitter); | 1306 AAAFillPath(path, clip.bwRgn(), blitter); |
| 1307 } else { | 1307 } else { |
| 1308 SkRegion tmp; | 1308 SkRegion tmp; |
| 1309 SkAAClipBlitter aaBlitter; | 1309 SkAAClipBlitter aaBlitter; |
| 1310 | 1310 |
| 1311 tmp.setRect(clip.getBounds()); | 1311 tmp.setRect(clip.getBounds()); |
| 1312 aaBlitter.init(blitter, &clip.aaRgn()); | 1312 aaBlitter.init(blitter, &clip.aaRgn()); |
| 1313 AAAFillPath(path, tmp, &aaBlitter); | 1313 AAAFillPath(path, tmp, &aaBlitter); |
| 1314 } | 1314 } |
| 1315 } | 1315 } |
| OLD | NEW |