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

Unified Diff: src/core/SkScan_AAAPath.cpp

Issue 2439973004: Fall back from analytic to sampling earlier (Closed)
Patch Set: Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkScan_AAAPath.cpp
diff --git a/src/core/SkScan_AAAPath.cpp b/src/core/SkScan_AAAPath.cpp
index e258a569dc5a9841fcef02dd28751d131fce790a..861a0ef58cd11840c197d6c331b696824c3a75fa 100644
--- a/src/core/SkScan_AAAPath.cpp
+++ b/src/core/SkScan_AAAPath.cpp
@@ -1130,11 +1130,8 @@ void SkScan::aaa_fill_path(const SkPath& path, const SkIRect* clipRect, Additive
bool forceRLE) { // forceRLE implies that SkAAClip is calling us
SkASSERT(blitter);
- if (path.isInverseFillType() || !path.isConvex()) {
- // fall back to supersampling AA
- SkScan::AntiFillPath(path, clipRgn, blitter->getRealBlitter(true), forceRLE);
- return;
- }
+ // we only implemented the convex shapes yet
+ SkASSERT(!path.isInverseFillType() && path.isConvex());
SkEdgeBuilder builder;
@@ -1217,6 +1214,11 @@ void SkScan::AAAFillPath(const SkPath& path, const SkRegion& origClip, SkBlitter
if (origClip.isEmpty()) {
return;
}
+ if (path.isInverseFillType() || !path.isConvex()) {
+ // Fall back as we only implemented the algorithm for convex shapes yet.
+ SkScan::AntiFillPath(path, origClip, blitter, forceRLE);
+ return;
+ }
const bool isInverse = path.isInverseFillType();
SkIRect ir;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698