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>
This commit is contained in:
Yuqian Li 2018-04-26 10:22:10 -04:00 committed by Skia Commit-Bot
parent abc8575380
commit c79e2d1551

View File

@ -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;
}