diff options
-rw-r--r-- | src/core/SkScan.h | 6 | ||||
-rw-r--r-- | src/core/SkScan_AAAPath.cpp | 6 | ||||
-rw-r--r-- | src/core/SkScan_AntiPath.cpp | 22 | ||||
-rw-r--r-- | src/core/SkScan_DAAPath.cpp | 6 |
4 files changed, 12 insertions, 28 deletions
diff --git a/src/core/SkScan.h b/src/core/SkScan.h index 0c5be3be1c..c04f09051f 100644 --- a/src/core/SkScan.h +++ b/src/core/SkScan.h @@ -93,11 +93,11 @@ private: static void HairLineRgn(const SkPoint[], int count, const SkRegion*, SkBlitter*); static void AntiHairLineRgn(const SkPoint[], int count, const SkRegion*, SkBlitter*); static void AAAFillPath(const SkPath& path, SkBlitter* blitter, const SkIRect& pathIR, - const SkIRect& clipBounds, bool containedInClip, bool forceRLE); + const SkIRect& clipBounds, bool forceRLE); static void DAAFillPath(const SkPath& path, SkBlitter* blitter, const SkIRect& pathIR, - const SkIRect& clipBounds, bool containedInClip, bool forceRLE); + const SkIRect& clipBounds, bool forceRLE); static void SAAFillPath(const SkPath& path, SkBlitter* blitter, const SkIRect& pathIR, - const SkIRect& clipBounds, bool containedInClip, bool forceRLE); + const SkIRect& clipBounds, bool forceRLE); }; /** Assign an SkXRect from a SkIRect, by promoting the src rect's coordinates diff --git a/src/core/SkScan_AAAPath.cpp b/src/core/SkScan_AAAPath.cpp index 313355d934..06b3a276ed 100644 --- a/src/core/SkScan_AAAPath.cpp +++ b/src/core/SkScan_AAAPath.cpp @@ -1685,10 +1685,8 @@ static SK_ALWAYS_INLINE void aaa_fill_path(const SkPath& path, const SkIRect& cl /////////////////////////////////////////////////////////////////////////////// void SkScan::AAAFillPath(const SkPath& path, SkBlitter* blitter, const SkIRect& ir, - const SkIRect& clipBounds, bool containedInClip, bool forceRLE) { -#if !defined(SK_SUPPORT_LEGACY_AA_BEHAVIOR) - containedInClip = clipBounds.contains(ir); -#endif + const SkIRect& clipBounds, bool forceRLE) { + bool containedInClip = clipBounds.contains(ir); bool isInverse = path.isInverseFillType(); // The mask blitter (where we store intermediate alpha values directly in a mask, and then call diff --git a/src/core/SkScan_AntiPath.cpp b/src/core/SkScan_AntiPath.cpp index fc9986b17a..f903a4fd5c 100644 --- a/src/core/SkScan_AntiPath.cpp +++ b/src/core/SkScan_AntiPath.cpp @@ -614,11 +614,8 @@ static bool ShouldUseAAA(const SkPath& path) { } void SkScan::SAAFillPath(const SkPath& path, SkBlitter* blitter, const SkIRect& ir, - const SkIRect& clipBounds, bool containedInClip, bool forceRLE) { -#if !defined(SK_SUPPORT_LEGACY_AA_BEHAVIOR) - containedInClip = clipBounds.contains(ir); -#endif - + const SkIRect& clipBounds, bool forceRLE) { + bool containedInClip = clipBounds.contains(ir); bool isInverse = path.isInverseFillType(); // MaskSuperBlitter can't handle drawing outside of ir, so we can't use it @@ -750,23 +747,14 @@ void SkScan::AntiFillPath(const SkPath& path, const SkRegion& origClip, SkASSERT(SkIntToScalar(ir.fTop) <= path.getBounds().fTop); -#ifdef SK_SUPPORT_LEGACY_CONTAINED_IN_CLIP - bool containedInClip = clipper.getClipRect() == nullptr; -#else - bool containedInClip = clipRgn->getBounds().contains(ir); -#endif - if (forceDAA || ShouldUseDAA(path)) { - SkScan::DAAFillPath(path, blitter, ir, clipRgn->getBounds(), - containedInClip, forceRLE); + SkScan::DAAFillPath(path, blitter, ir, clipRgn->getBounds(), forceRLE); } else if (ShouldUseAAA(path)) { // Do not use AAA if path is too complicated: // there won't be any speedup or significant visual improvement. - SkScan::AAAFillPath(path, blitter, ir, clipRgn->getBounds(), - containedInClip, forceRLE); + SkScan::AAAFillPath(path, blitter, ir, clipRgn->getBounds(), forceRLE); } else { - SkScan::SAAFillPath(path, blitter, ir, clipRgn->getBounds(), - containedInClip, forceRLE); + SkScan::SAAFillPath(path, blitter, ir, clipRgn->getBounds(), forceRLE); } if (isInverse) { diff --git a/src/core/SkScan_DAAPath.cpp b/src/core/SkScan_DAAPath.cpp index 3d3d4c152e..948accef34 100644 --- a/src/core/SkScan_DAAPath.cpp +++ b/src/core/SkScan_DAAPath.cpp @@ -319,10 +319,8 @@ void gen_alpha_deltas(const SkPath& path, const SkIRect& clipBounds, Deltas& res // blitRegion, sk_blit_above, sk_blit_below in SkScan::AntiFillPath to maintain the draw order. If // we do that, be caureful that blitRect may throw exception if the rect is empty. void SkScan::DAAFillPath(const SkPath& path, SkBlitter* blitter, const SkIRect& ir, - const SkIRect& clipBounds, bool containedInClip, bool forceRLE) { -#if !defined(SK_SUPPORT_LEGACY_AA_BEHAVIOR) - containedInClip = clipBounds.contains(ir); -#endif + const SkIRect& clipBounds, bool forceRLE) { + bool containedInClip = clipBounds.contains(ir); bool isEvenOdd = path.getFillType() & 1; bool isConvex = path.isConvex(); bool isInverse = path.isInverseFillType(); |