aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrDrawContext.cpp
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2016-10-06 15:03:34 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2016-10-06 19:42:34 +0000
commit79839d45f893ad5690fc83c951567b3686e781e6 (patch)
tree0501886e238f2d021c0372a6570a00e69d90da32 /src/gpu/GrDrawContext.cpp
parentd87bd7cfd1dae55fbe4331586aacac3468d59a77 (diff)
Add distance values to interior of filled RRects
This doesn't compute the correct distance vector but it suffices for gaussian edges. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2986 Change-Id: I8bd9e37b0f3788c30d85c95a3c0845d093f22554 Reviewed-on: https://skia-review.googlesource.com/2986 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/GrDrawContext.cpp')
-rw-r--r--src/gpu/GrDrawContext.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/gpu/GrDrawContext.cpp b/src/gpu/GrDrawContext.cpp
index 42d6795903..5b5428ac0d 100644
--- a/src/gpu/GrDrawContext.cpp
+++ b/src/gpu/GrDrawContext.cpp
@@ -851,11 +851,13 @@ void GrDrawContext::drawRRect(const GrClip& origClip,
if (should_apply_coverage_aa(paint, fRenderTarget.get(), &useHWAA)) {
GrShaderCaps* shaderCaps = fContext->caps()->shaderCaps();
- SkAutoTUnref<GrDrawBatch> batch(GrOvalRenderer::CreateRRectBatch(paint.getColor(),
- viewMatrix,
- rrect,
- stroke,
- shaderCaps));
+ SkAutoTUnref<GrDrawBatch> batch(GrOvalRenderer::CreateRRectBatch(
+ paint.getColor(),
+ paint.usesDistanceVectorField(),
+ viewMatrix,
+ rrect,
+ stroke,
+ shaderCaps));
if (batch) {
GrPipelineBuilder pipelineBuilder(paint, useHWAA);
this->getDrawTarget()->drawBatch(pipelineBuilder, this, *clip, batch);