Consolidate handling of infinitely thin primitives and aa bloat handing WRT batch bounds.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2127673002
Review-Url: https://codereview.chromium.org/2127673002
diff --git a/src/gpu/batches/GrAAFillRectBatch.cpp b/src/gpu/batches/GrAAFillRectBatch.cpp
index fedde70..4f93adf 100644
--- a/src/gpu/batches/GrAAFillRectBatch.cpp
+++ b/src/gpu/batches/GrAAFillRectBatch.cpp
@@ -173,7 +173,9 @@
void* mem = fRectData.push_back_n(sizeof(RectInfo));
new (mem) RectInfo(color, viewMatrix, rect, devRect);
}
- fBounds = devRect;
+ IsZeroArea zeroArea = (!rect.width() || !rect.height()) ? IsZeroArea::kYes
+ : IsZeroArea::kNo;
+ this->setBounds(devRect, HasAABloat::kYes, zeroArea);
fRectCnt = 1;
}
@@ -278,7 +280,7 @@
fRectData.push_back_n(that->fRectData.count(), that->fRectData.begin());
fRectCnt += that->fRectCnt;
- this->joinBounds(that->bounds());
+ this->joinBounds(*that);
return true;
}