diff options
author | 2017-12-01 20:53:00 +0000 | |
---|---|---|
committer | 2017-12-01 20:53:10 +0000 | |
commit | ec727c981dd7ed83e98c7713c2828c6ab144937b (patch) | |
tree | 3569abf05c222405def8fd3af845d3785a006027 /src/gpu/GrRenderTargetContext.cpp | |
parent | afca4d6bc00a16e80b93f20742db9391bf65f508 (diff) |
Revert "Fix rendering of drrects with small circular inner rrects."
This reverts commit 096074af2c6fcbf622f0a42b2f7c56d0c66fbd80.
Reason for revert: failing processor validation test
Original change's description:
> Fix rendering of drrects with small circular inner rrects.
>
> Previously when the inner rrect was a circle with a radius of 1 we would
> cause a inf * 0 in the shader which would lead to the shape not rendering.
>
> This change also makes concentric circle drrects draw as stroked circles.
>
> bug: chromium:789262
>
> Change-Id: I6efbe3fdde25d6c4e031c7412d83df009afe014a
> Reviewed-on: https://skia-review.googlesource.com/79141
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
TBR=bsalomon@google.com,robertphillips@google.com
Change-Id: Ie9b9c81380c0f98a6fc6c6dc350ec56402c4ff2b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/79264
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/GrRenderTargetContext.cpp')
-rw-r--r-- | src/gpu/GrRenderTargetContext.cpp | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/src/gpu/GrRenderTargetContext.cpp b/src/gpu/GrRenderTargetContext.cpp index aba2e1db29..2310ebda94 100644 --- a/src/gpu/GrRenderTargetContext.cpp +++ b/src/gpu/GrRenderTargetContext.cpp @@ -1224,28 +1224,6 @@ bool GrRenderTargetContext::drawFilledDRRect(const GrClip& clip, } } - SkTCopyOnFirstWrite<SkRRect> inner(origInner), outer(origOuter); - - if (aa == GrAA::kYes && inner->isCircle() && outer->isCircle()) { - auto outerR = outer->width() / 2.f; - auto innerR = inner->width() / 2.f; - auto cx = outer->getBounds().fLeft + outerR; - auto cy = outer->getBounds().fTop + outerR; - if (SkScalarNearlyEqual(cx, inner->getBounds().fLeft + innerR) && - SkScalarNearlyEqual(cy, inner->getBounds().fTop + innerR)) { - auto avgR = (innerR + outerR) / 2.f; - auto circleBounds = SkRect::MakeLTRB(cx - avgR, cy - avgR, cx + avgR, cy + avgR); - SkStrokeRec stroke(SkStrokeRec::kFill_InitStyle); - stroke.setStrokeStyle(outerR - innerR); - auto op = GrOvalOpFactory::MakeOvalOp(std::move(paint), viewMatrix, circleBounds, - stroke, this->caps()->shaderCaps()); - if (op) { - this->addDrawOp(clip, std::move(op)); - return true; - } - } - } - GrAAType aaType = this->chooseAAType(aa, GrAllowMixedSamples::kNo); GrClipEdgeType innerEdgeType, outerEdgeType; @@ -1257,6 +1235,7 @@ bool GrRenderTargetContext::drawFilledDRRect(const GrClip& clip, outerEdgeType = GrClipEdgeType::kFillBW; } + SkTCopyOnFirstWrite<SkRRect> inner(origInner), outer(origOuter); SkMatrix inverseVM; if (!viewMatrix.isIdentity()) { if (!origInner.transform(viewMatrix, inner.writable())) { |