aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrOvalRenderer.cpp
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2016-10-06 17:38:46 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2016-10-07 13:09:23 +0000
commit3786c7716c4796146835e60d7145cff252ed50bd (patch)
tree926f22d27b064f6598f33fe5c512b925bef7078c /src/gpu/GrOvalRenderer.cpp
parent1aebdaee0e2aa4324509fd3ad4c40c21703ae4a2 (diff)
Disable antialiasing on interior of filled RRects that need distance vectors
The interior antialiasing was causing a small transparent rectangle in the middle of filled rects GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3062 Change-Id: If0bf26b96c8969af6d81f3a3d6fee59e8c1d747e Reviewed-on: https://skia-review.googlesource.com/3062 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/GrOvalRenderer.cpp')
-rw-r--r--src/gpu/GrOvalRenderer.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/gpu/GrOvalRenderer.cpp b/src/gpu/GrOvalRenderer.cpp
index 3f759e92fb..c809a47234 100644
--- a/src/gpu/GrOvalRenderer.cpp
+++ b/src/gpu/GrOvalRenderer.cpp
@@ -1548,7 +1548,7 @@ private:
static void FillInOverstrokeVerts(CircleVertex** verts, const SkRect& bounds,
SkScalar smInset, SkScalar bigInset, SkScalar xOffset,
- SkScalar outerRadius, GrColor color) {
+ SkScalar outerRadius, SkScalar innerRadius, GrColor color) {
SkASSERT(smInset < bigInset);
// TL
@@ -1556,7 +1556,7 @@ private:
(*verts)->fColor = color;
(*verts)->fOffset = SkPoint::Make(xOffset, 0);
(*verts)->fOuterRadius = outerRadius;
- (*verts)->fInnerRadius = 0;
+ (*verts)->fInnerRadius = innerRadius;
(*verts)++;
// TR
@@ -1564,35 +1564,35 @@ private:
(*verts)->fColor = color;
(*verts)->fOffset = SkPoint::Make(xOffset, 0);
(*verts)->fOuterRadius = outerRadius;
- (*verts)->fInnerRadius = 0;
+ (*verts)->fInnerRadius = innerRadius;
(*verts)++;
(*verts)->fPos = SkPoint::Make(bounds.fLeft + bigInset, bounds.fTop + bigInset);
(*verts)->fColor = color;
(*verts)->fOffset = SkPoint::Make(0, 0);
(*verts)->fOuterRadius = outerRadius;
- (*verts)->fInnerRadius = 0;
+ (*verts)->fInnerRadius = innerRadius;
(*verts)++;
(*verts)->fPos = SkPoint::Make(bounds.fRight - bigInset, bounds.fTop + bigInset);
(*verts)->fColor = color;
(*verts)->fOffset = SkPoint::Make(0, 0);
(*verts)->fOuterRadius = outerRadius;
- (*verts)->fInnerRadius = 0;
+ (*verts)->fInnerRadius = innerRadius;
(*verts)++;
(*verts)->fPos = SkPoint::Make(bounds.fLeft + bigInset, bounds.fBottom - bigInset);
(*verts)->fColor = color;
(*verts)->fOffset = SkPoint::Make(0, 0);
(*verts)->fOuterRadius = outerRadius;
- (*verts)->fInnerRadius = 0;
+ (*verts)->fInnerRadius = innerRadius;
(*verts)++;
(*verts)->fPos = SkPoint::Make(bounds.fRight - bigInset, bounds.fBottom - bigInset);
(*verts)->fColor = color;
(*verts)->fOffset = SkPoint::Make(0, 0);
(*verts)->fOuterRadius = outerRadius;
- (*verts)->fInnerRadius = 0;
+ (*verts)->fInnerRadius = innerRadius;
(*verts)++;
// BL
@@ -1600,7 +1600,7 @@ private:
(*verts)->fColor = color;
(*verts)->fOffset = SkPoint::Make(xOffset, 0);
(*verts)->fOuterRadius = outerRadius;
- (*verts)->fInnerRadius = 0;
+ (*verts)->fInnerRadius = innerRadius;
(*verts)++;
// BR
@@ -1608,7 +1608,7 @@ private:
(*verts)->fColor = color;
(*verts)->fOffset = SkPoint::Make(xOffset, 0);
(*verts)->fOuterRadius = outerRadius;
- (*verts)->fInnerRadius = 0;
+ (*verts)->fInnerRadius = innerRadius;
(*verts)++;
}
@@ -1715,7 +1715,7 @@ private:
SkScalar maxOffset = -args.fInnerRadius / overstrokeOuterRadius;
FillInOverstrokeVerts(&verts, bounds, outerRadius, overstrokeOuterRadius,
- maxOffset, overstrokeOuterRadius, color);
+ maxOffset, overstrokeOuterRadius, 0.0f, color);
}
if (kFillWithDist_RRectType == args.fType) {
@@ -1724,7 +1724,7 @@ private:
SkScalar xOffset = 1.0f - outerRadius / halfMinDim;
FillInOverstrokeVerts(&verts, bounds, outerRadius, halfMinDim,
- xOffset, halfMinDim, color);
+ xOffset, halfMinDim, -1.0f, color);
}
const uint16_t* primIndices = rrect_type_to_indices(args.fType);