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

Unified Diff: src/gpu/GrOvalRenderer.cpp

Issue 1692303003: Roll back ellipse logic for now. This was (probably) still wrong. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 10 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 5779f8ac4c7dd67b5a7fb511ebd6ab5e335a06a7..d3f590277e28997ebea7aa6ad5705725dd8423dd 100644
--- a/src/gpu/GrOvalRenderer.cpp
+++ b/src/gpu/GrOvalRenderer.cpp
@@ -1081,8 +1081,8 @@ static GrDrawBatch* create_ellipse_batch(GrColor color,
// We've extended the outer x radius out half a pixel to antialias.
// This will also expand the rect so all the pixels will be captured.
// TODO: Consider if we should use sqrt(2)/2 instead
- SkScalar geoXRadius = xRadius + SK_ScalarHalf;
- SkScalar geoYRadius = yRadius + SK_ScalarHalf;
+ xRadius += SK_ScalarHalf;
+ yRadius += SK_ScalarHalf;
EllipseBatch::Geometry geometry;
geometry.fViewMatrix = viewMatrix;
@@ -1092,8 +1092,8 @@ static GrDrawBatch* create_ellipse_batch(GrColor color,
geometry.fInnerXRadius = innerXRadius;
geometry.fInnerYRadius = innerYRadius;
geometry.fStroke = isStrokeOnly && innerXRadius > 0 && innerYRadius > 0;
- geometry.fDevBounds = SkRect::MakeLTRB(center.fX - geoXRadius, center.fY - geoYRadius,
- center.fX + geoXRadius, center.fY + geoYRadius);
+ geometry.fDevBounds = SkRect::MakeLTRB(center.fX - xRadius, center.fY - yRadius,
+ center.fX + xRadius, center.fY + yRadius);
return EllipseBatch::Create(geometry);
}
« 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