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

Unified Diff: src/gpu/GrOvalRenderer.cpp

Issue 2106953009: Fix bug where ovals' AA exceed bounds by .5 pixel (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Created 4 years, 6 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrOvalRenderer.cpp
diff --git a/src/gpu/GrOvalRenderer.cpp b/src/gpu/GrOvalRenderer.cpp
index cef08f431e3a4f047737d6d845c66e58b8f2cf3a..0143020f7767ebc2d5c077afdacfc09692462e5a 100644
--- a/src/gpu/GrOvalRenderer.cpp
+++ b/src/gpu/GrOvalRenderer.cpp
@@ -944,6 +944,11 @@ static GrDrawBatch* create_ellipse_batch(GrColor color,
xRadius += SK_ScalarHalf;
yRadius += SK_ScalarHalf;
robertphillips 2016/06/30 14:10:16 Hmmm ... can we not just remove the above 2 lines
vjiaoblack 2016/06/30 14:13:35 Right yeah, sorry. Jim pointed this out while over
+ // fix bug where the ovals are drawn 0.5 pixels too big on each side
+ // (the 0.5 width antialiasing exceeds the rect bounds)
+ xRadius -= 0.5f;
+ yRadius -= 0.5f;
+
EllipseBatch::Geometry geometry;
geometry.fColor = color;
geometry.fXRadius = xRadius;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698