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/GrDefaultPathRenderer.cpp b/src/gpu/batches/GrDefaultPathRenderer.cpp
index a1fbc09..335f3b6 100644
--- a/src/gpu/batches/GrDefaultPathRenderer.cpp
+++ b/src/gpu/batches/GrDefaultPathRenderer.cpp
@@ -106,13 +106,8 @@
fBatch.fViewMatrix = viewMatrix;
fGeoData.emplace_back(Geometry{color, path, tolerance});
- this->setBounds(devBounds);
-
- // This is b.c. hairlines are notionally infinitely thin so without expansion
- // two overlapping lines could be reordered even though they hit the same pixels.
- if (isHairline) {
- fBounds.outset(0.5f, 0.5f);
- }
+ this->setBounds(devBounds, HasAABloat::kNo,
+ isHairline ? IsZeroArea::kYes : IsZeroArea::kNo);
}
const char* name() const override { return "DefaultPathBatch"; }
@@ -286,7 +281,7 @@
}
fGeoData.push_back_n(that->fGeoData.count(), that->fGeoData.begin());
- this->joinBounds(that->bounds());
+ this->joinBounds(*that);
return true;
}