diff options
author | Yuqian Li <liyuqian@google.com> | 2017-11-09 10:07:12 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-11-09 15:27:44 +0000 |
commit | 75309d1f87a5d2b7f60873480d9e36ce4f5c886f (patch) | |
tree | 49e94766a5237d8c8fdc3dd20dc9df669e40e85e /src | |
parent | 14a8dd7255494c982673b2926e56a60e36a1a8a6 (diff) |
Compute more accurate containedInClip
Eventually, we'll remove containedInClip from the function parameters
and just compute it using ir and clipBounds. The current approach is
for preparing rebaseline.
TBR: reed@google.com
Bug: skia:7271
Change-Id: Ife60e173d9f4f1c9ec80d13a2f7a88a0433b61e9
Reviewed-on: https://skia-review.googlesource.com/69220
Reviewed-by: Yuqian Li <liyuqian@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/core/SkScan_AAAPath.cpp | 3 | ||||
-rw-r--r-- | src/core/SkScan_AntiPath.cpp | 4 | ||||
-rw-r--r-- | src/core/SkScan_DAAPath.cpp | 3 |
3 files changed, 10 insertions, 0 deletions
diff --git a/src/core/SkScan_AAAPath.cpp b/src/core/SkScan_AAAPath.cpp index 6362d2f1e0..313355d934 100644 --- a/src/core/SkScan_AAAPath.cpp +++ b/src/core/SkScan_AAAPath.cpp @@ -1686,6 +1686,9 @@ 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 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 1178c9c541..8f20ef6eb9 100644 --- a/src/core/SkScan_AntiPath.cpp +++ b/src/core/SkScan_AntiPath.cpp @@ -615,6 +615,10 @@ 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 + bool isInverse = path.isInverseFillType(); // MaskSuperBlitter can't handle drawing outside of ir, so we can't use it diff --git a/src/core/SkScan_DAAPath.cpp b/src/core/SkScan_DAAPath.cpp index cd1717fd2d..d4860daf22 100644 --- a/src/core/SkScan_DAAPath.cpp +++ b/src/core/SkScan_DAAPath.cpp @@ -320,6 +320,9 @@ void gen_alpha_deltas(const SkPath& path, const SkIRect& clipBounds, Deltas& res // 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 bool isEvenOdd = path.getFillType() & 1; bool isConvex = path.isConvex(); bool isInverse = path.isInverseFillType(); |