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

Unified Diff: src/gpu/GrAAHairLinePathRenderer.cpp

Issue 1123253003: fix bounds for BW lines, AA Hairlines (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: tweaks Created 5 years, 7 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 | « no previous file | src/gpu/GrContext.cpp » ('j') | src/gpu/GrContext.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrAAHairLinePathRenderer.cpp
diff --git a/src/gpu/GrAAHairLinePathRenderer.cpp b/src/gpu/GrAAHairLinePathRenderer.cpp
index f9b0c5a7ffca5f536c5207711ad58bd2c7491626..efb25c7aca807d24671aa11b7704c69e22440001 100644
--- a/src/gpu/GrAAHairLinePathRenderer.cpp
+++ b/src/gpu/GrAAHairLinePathRenderer.cpp
@@ -731,6 +731,9 @@ private:
// compute bounds
fBounds = geometry.fPath.getBounds();
geometry.fViewMatrix.mapRect(&fBounds);
+
+ // AAHairlines need to be outset a half pixel in each direction to account for AA
robertphillips 2015/05/07 13:17:17 // This is b.c. hairlines are notionally infinitel
+ fBounds.outset(0.5f, 0.5f);
}
bool onCombineIfPossible(GrBatch* t) override {
« no previous file with comments | « no previous file | src/gpu/GrContext.cpp » ('j') | src/gpu/GrContext.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698