diff options
author | Yuqian Li <liyuqian@google.com> | 2018-04-26 10:22:10 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-04-26 14:51:53 +0000 |
commit | c79e2d1551517093f49f3c77ca7dae19c8fe2651 (patch) | |
tree | a706b3d1e2b43ea4ab54fff92648a8f8b56d3c12 /src/core/SkBlitter.cpp | |
parent | abc8575380e031c476fec6791df4bfb3244ea928 (diff) |
Check negative width before blitAntiRect
Since we decrease the width when clipped, it might be negative.
Bug: skia:7858
Change-Id: I348bd07d917905a55bec1a4b4e0915c6528fe6b1
Reviewed-on: https://skia-review.googlesource.com/123927
Auto-Submit: Yuqian Li <liyuqian@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
Diffstat (limited to 'src/core/SkBlitter.cpp')
-rw-r--r-- | src/core/SkBlitter.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/SkBlitter.cpp b/src/core/SkBlitter.cpp index da2ea0c08e..5cf8147019 100644 --- a/src/core/SkBlitter.cpp +++ b/src/core/SkBlitter.cpp @@ -147,7 +147,9 @@ void SkBlitter::blitCoverageDeltas(SkCoverageDeltaList* deltas, const SkIRect& c height -= botOverClip; } - this->blitAntiRect(rectX, rectY, width, height, leftAlpha, rightAlpha); + if (width >= 0) { + this->blitAntiRect(rectX, rectY, width, height, leftAlpha, rightAlpha); + } y += antiRect.fHeight - 1; // -1 because ++y in the for loop continue; } |