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

Unified Diff: src/gpu/GrDrawContext.cpp

Issue 1467253002: Restrict query bounds for reduce clip to dev bounds (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address comments Created 5 years, 1 month 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/GrClipMaskManager.cpp ('k') | src/gpu/GrDrawTarget.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrDrawContext.cpp
diff --git a/src/gpu/GrDrawContext.cpp b/src/gpu/GrDrawContext.cpp
index 6718699c9a293bac706e87d2dfaec30faf85cc32..1137c57bc474a4f7035f5f607351469d93e0a260 100644
--- a/src/gpu/GrDrawContext.cpp
+++ b/src/gpu/GrDrawContext.cpp
@@ -409,8 +409,10 @@ void GrDrawContext::drawVertices(const GrClip& clip,
viewMatrix.mapRect(&bounds);
// If we don't have AA then we outset for a half pixel in each direction to account for
- // snapping
- if (!paint.isAntiAlias()) {
+ // snapping. We also do this for the "hair" primitive types: lines and points since they have
+ // a 1 pixel thickness in device space.
+ if (!paint.isAntiAlias() || GrIsPrimTypeLines(primitiveType) ||
+ kPoints_GrPrimitiveType == primitiveType) {
bounds.outset(0.5f, 0.5f);
}
« no previous file with comments | « src/gpu/GrClipMaskManager.cpp ('k') | src/gpu/GrDrawTarget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698