diff options
author | bsalomon <bsalomon@google.com> | 2016-05-10 06:19:21 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-05-10 06:19:21 -0700 |
commit | 85d9667f59d4138438427bb2cdf67992d100e1a0 (patch) | |
tree | 1d86fd1d78a1bdd36f6b250bf31dd285986db5ef /src/gpu/GrClipMaskManager.cpp | |
parent | 00e9452791a80ed9fb824214b259ecb9af0c25c6 (diff) |
Revert of Replace GrStrokeInfo with GrStyle. (patchset #4 id:160001 of https://codereview.chromium.org/1957363002/ )
Reason for revert:
Breaking some bots
Original issue's description:
> Replace GrStrokeInfo with GrStyle.
>
> A side effect is that arbitrary path effects can no be pushed deeper into the Ganesh flow for paths. They may be applied by path renderers.
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1957363002
>
> Committed: https://skia.googlesource.com/skia/+/33595bdf4b64a745f6340338d307e806e96c587f
TBR=egdaniel@google.com,robertphillips@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Review-Url: https://codereview.chromium.org/1967513002
Diffstat (limited to 'src/gpu/GrClipMaskManager.cpp')
-rw-r--r-- | src/gpu/GrClipMaskManager.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/gpu/GrClipMaskManager.cpp b/src/gpu/GrClipMaskManager.cpp index 56c0ee641b..654b315d52 100644 --- a/src/gpu/GrClipMaskManager.cpp +++ b/src/gpu/GrClipMaskManager.cpp @@ -85,6 +85,7 @@ bool GrClipMaskManager::PathNeedsSWRenderer(GrContext* context, if (path.isInverseFillType()) { path.toggleInverseFillType(); } + GrStrokeInfo stroke(SkStrokeRec::kFill_InitStyle); GrPathRendererChain::DrawType type; @@ -102,7 +103,7 @@ bool GrClipMaskManager::PathNeedsSWRenderer(GrContext* context, canDrawArgs.fShaderCaps = context->caps()->shaderCaps(); canDrawArgs.fViewMatrix = &viewMatrix; canDrawArgs.fPath = &path; - canDrawArgs.fStyle = &GrStyle::SimpleFill(); + canDrawArgs.fStroke = &stroke; canDrawArgs.fAntiAlias = element->isAA(); canDrawArgs.fIsStencilDisabled = isStencilDisabled; canDrawArgs.fIsStencilBufferMSAA = rt->isStencilBufferMultisampled(); @@ -590,7 +591,7 @@ static void draw_element(GrDrawContext* dc, path.toggleInverseFillType(); } - dc->drawPath(clip, paint, viewMatrix, path, GrStyle::SimpleFill()); + dc->drawPath(clip, paint, viewMatrix, path, GrStrokeInfo::FillInfo()); break; } } @@ -784,6 +785,7 @@ bool GrClipMaskManager::createStencilClipMask(GrRenderTarget* rt, // stencil with arbitrary stencil settings. GrPathRenderer::StencilSupport stencilSupport; + GrStrokeInfo stroke(SkStrokeRec::kFill_InitStyle); SkRegion::Op op = element->getOp(); GrPathRenderer* pr = nullptr; @@ -804,7 +806,7 @@ bool GrClipMaskManager::createStencilClipMask(GrRenderTarget* rt, canDrawArgs.fShaderCaps = this->getContext()->caps()->shaderCaps(); canDrawArgs.fViewMatrix = &viewMatrix; canDrawArgs.fPath = &clipPath; - canDrawArgs.fStyle = &GrStyle::SimpleFill(); + canDrawArgs.fStroke = &stroke; canDrawArgs.fAntiAlias = false; canDrawArgs.fIsStencilDisabled = pipelineBuilder.getStencil().isDisabled(); canDrawArgs.fIsStencilBufferMSAA = rt->isStencilBufferMultisampled(); @@ -859,7 +861,7 @@ bool GrClipMaskManager::createStencilClipMask(GrRenderTarget* rt, args.fColor = GrColor_WHITE; args.fViewMatrix = &viewMatrix; args.fPath = &clipPath; - args.fStyle = &GrStyle::SimpleFill(); + args.fStroke = &stroke; args.fAntiAlias = false; args.fGammaCorrect = false; pr->drawPath(args); @@ -894,7 +896,7 @@ bool GrClipMaskManager::createStencilClipMask(GrRenderTarget* rt, args.fColor = GrColor_WHITE; args.fViewMatrix = &viewMatrix; args.fPath = &clipPath; - args.fStyle = &GrStyle::SimpleFill(); + args.fStroke = &stroke; args.fAntiAlias = false; args.fGammaCorrect = false; pr->drawPath(args); @@ -1098,6 +1100,7 @@ GrTexture* GrClipMaskManager::CreateSoftwareClipMask(GrContext* context, helper.init(maskSpaceIBounds, &translate, false); helper.clear(GrReducedClip::kAllIn_InitialState == initialState ? 0xFF : 0x00); + SkStrokeRec stroke(SkStrokeRec::kFill_InitStyle); for (GrReducedClip::ElementList::Iter iter(elements.headIter()) ; iter.get(); iter.next()) { const Element* element = iter.get(); @@ -1116,8 +1119,7 @@ GrTexture* GrClipMaskManager::CreateSoftwareClipMask(GrContext* context, SkPath clipPath; element->asPath(&clipPath); clipPath.toggleInverseFillType(); - helper.draw(clipPath, GrStyle::SimpleFill(), SkRegion::kReplace_Op, element->isAA(), - 0x00); + helper.draw(clipPath, stroke, SkRegion::kReplace_Op, element->isAA(), 0x00); continue; } @@ -1128,7 +1130,7 @@ GrTexture* GrClipMaskManager::CreateSoftwareClipMask(GrContext* context, } else { SkPath path; element->asPath(&path); - helper.draw(path, GrStyle::SimpleFill(), op, element->isAA(), 0xFF); + helper.draw(path, stroke, op, element->isAA(), 0xFF); } } |