Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1129)

Unified Diff: src/gpu/batches/GrDefaultPathRenderer.cpp

Issue 2127673002: Consolidate handling of infinitely thin primitives and aa bloat handing WRT batch bounds (Closed) Base URL: https://skia.googlesource.com/skia.git@AAStrokeRect
Patch Set: update for instanced rendering Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/batches/GrCopySurfaceBatch.h ('k') | src/gpu/batches/GrDiscardBatch.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/batches/GrDefaultPathRenderer.cpp
diff --git a/src/gpu/batches/GrDefaultPathRenderer.cpp b/src/gpu/batches/GrDefaultPathRenderer.cpp
index a1fbc09e5f53d3429894f61471ce54a18d071df0..335f3b60faa9901180f4dbd38c5f1dd105873004 100644
--- a/src/gpu/batches/GrDefaultPathRenderer.cpp
+++ b/src/gpu/batches/GrDefaultPathRenderer.cpp
@@ -106,13 +106,8 @@ public:
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 @@ private:
}
fGeoData.push_back_n(that->fGeoData.count(), that->fGeoData.begin());
- this->joinBounds(that->bounds());
+ this->joinBounds(*that);
return true;
}
« no previous file with comments | « src/gpu/batches/GrCopySurfaceBatch.h ('k') | src/gpu/batches/GrDiscardBatch.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698