diff options
author | reed <reed@google.com> | 2015-02-09 08:33:07 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-02-09 08:33:07 -0800 |
commit | 31223e0cb74f47f63b094520a9830c525b72fe87 (patch) | |
tree | e8d733c11acb5c64c089fca92e0cc868f49fb7e3 /src/core/SkEdgeClipper.cpp | |
parent | 70a8ca8351b0338b7d63917a818433dc8d71d291 (diff) |
cull edges that are to the right of the clip
BUG=skia:
Review URL: https://codereview.chromium.org/913503002
Diffstat (limited to 'src/core/SkEdgeClipper.cpp')
-rw-r--r-- | src/core/SkEdgeClipper.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/core/SkEdgeClipper.cpp b/src/core/SkEdgeClipper.cpp index 00a1dd2494..32277bcf8e 100644 --- a/src/core/SkEdgeClipper.cpp +++ b/src/core/SkEdgeClipper.cpp @@ -148,7 +148,9 @@ void SkEdgeClipper::clipMonoQuad(const SkPoint srcPts[3], const SkRect& clip) { return; } if (pts[0].fX >= clip.fRight) { // wholly to the right - this->appendVLine(clip.fRight, pts[0].fY, pts[2].fY, reverse); + if (!this->canCullToTheRight()) { + this->appendVLine(clip.fRight, pts[0].fY, pts[2].fY, reverse); + } return; } @@ -350,7 +352,9 @@ void SkEdgeClipper::clipMonoCubic(const SkPoint src[4], const SkRect& clip) { return; } if (pts[0].fX >= clip.fRight) { // wholly to the right - this->appendVLine(clip.fRight, pts[0].fY, pts[3].fY, reverse); + if (!this->canCullToTheRight()) { + this->appendVLine(clip.fRight, pts[0].fY, pts[3].fY, reverse); + } return; } |