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

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

Issue 1372973003: fix for default path renderer draws harlines without bloating (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix reordering Created 5 years, 3 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/GrDrawTarget.cpp ('k') | no next file » | 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 67bccb63b47346382bdd24487bd9f4ff99e98ac0..d0777e253fa70332ee36988fe5c0685a2506acd7 100644
--- a/src/gpu/batches/GrDefaultPathRenderer.cpp
+++ b/src/gpu/batches/GrDefaultPathRenderer.cpp
@@ -386,6 +386,12 @@ private:
fGeoData.push_back(geometry);
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);
+ }
}
bool onCombineIfPossible(GrBatch* t, const GrCaps& caps) override {
« no previous file with comments | « src/gpu/GrDrawTarget.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698