Do not call blitAntiRect for empty rect

BUG=chromium:662800
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2490673002

Review-Url: https://codereview.chromium.org/2490673002
This commit is contained in:
liyuqian 2016-11-08 13:42:59 -08:00 committed by Commit bot
parent dbdf6d210b
commit f6bddfd33d

View File

@ -997,7 +997,10 @@ static inline void aaa_walk_convex_edges(SkAnalyticEdge* prevHead, AdditiveBlitt
}
// Blit all full-height rows from fullTop to fullBot
if (fullBot > fullTop) {
if (fullBot > fullTop &&
// SkAAClip cannot handle the empty rect so check the non-emptiness here
// (bug chromium:662800)
(fullRite > fullLeft || f2a(partialLeft) > 0 || f2a(partialRite) > 0)) {
blitter->getRealBlitter()->blitAntiRect(fullLeft - 1, fullTop,
fullRite - fullLeft, fullBot - fullTop,
f2a(partialLeft), f2a(partialRite));