Revert "GrClips provided as pointers to GrRTC"
This reverts commit 226b689471a0fbb7400bc166032458278957541b.
Reason for revert: Breaks Android roller
Original change's description:
> GrClips provided as pointers to GrRTC
>
> A null clip represents no high-level clipping is necessary (the implicit
> clip to the render target's logical dimensions is fine).
>
> This also removes GrNoClip and GrFixedClip::Disabled() since they are
> replaced with just nullptr.
>
> By allowing nullptr to represent no intended clipping, it makes it easier
> to require GrClip and GrAppliedClip objects to know about the dimensions
> of the device. If we required a non-null clip object to represent no
> clipping, we'd have to have an instance for each device based on its
> size and that just became cumbersome.
>
> Bug: skia:10205
> Change-Id: Ie30cc71820b92d99356d393a4c98c8677082e761
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/290539
> Commit-Queue: Michael Ludwig <michaelludwig@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
TBR=bsalomon@google.com,csmartdalton@google.com,michaelludwig@google.com
Change-Id: I42c4828bcf016ee3d30d5c20b771be96e125817b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:10205
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/292856
Reviewed-by: Weston Tracey <westont@google.com>
Commit-Queue: Weston Tracey <westont@google.com>
diff --git a/src/gpu/ops/GrStencilAndCoverPathRenderer.cpp b/src/gpu/ops/GrStencilAndCoverPathRenderer.cpp
index 61f6a11..59a8bf7 100644
--- a/src/gpu/ops/GrStencilAndCoverPathRenderer.cpp
+++ b/src/gpu/ops/GrStencilAndCoverPathRenderer.cpp
@@ -101,7 +101,7 @@
"GrStencilAndCoverPathRenderer::onStencilPath");
sk_sp<GrPath> p(get_gr_path(fResourceProvider, *args.fShape));
args.fRenderTargetContext->priv().stencilPath(
- args.fClip, args.fDoStencilMSAA, *args.fViewMatrix, std::move(p));
+ *args.fClip, args.fDoStencilMSAA, *args.fViewMatrix, std::move(p));
}
bool GrStencilAndCoverPathRenderer::onDrawPath(const DrawPathArgs& args) {
@@ -126,7 +126,7 @@
// fake inverse with a stencil and cover
GrAppliedClip appliedClip;
- if (args.fClip && !args.fClip->apply(
+ if (!args.fClip->apply(
args.fContext, args.fRenderTargetContext, doStencilMSAA, true, &appliedClip,
&devBounds)) {
return true;
@@ -142,7 +142,7 @@
// Just ignore the analytic FPs (if any) during the stencil pass. They will still clip the
// final draw and it is meaningless to multiply by coverage when drawing to stencil.
args.fRenderTargetContext->priv().stencilPath(
- &stencilClip, GrAA(doStencilMSAA), viewMatrix, std::move(path));
+ stencilClip, GrAA(doStencilMSAA), viewMatrix, std::move(path));
{
static constexpr GrUserStencilSettings kInvertedCoverPass(
@@ -179,14 +179,14 @@
doStencilMSAA = GrAA::kYes;
}
args.fRenderTargetContext->priv().stencilRect(
- args.fClip, &kInvertedCoverPass, std::move(args.fPaint), doStencilMSAA,
+ *args.fClip, &kInvertedCoverPass, std::move(args.fPaint), doStencilMSAA,
coverMatrix, coverBounds, &localMatrix);
}
} else {
std::unique_ptr<GrDrawOp> op = GrDrawPathOp::Make(
args.fContext, viewMatrix, std::move(args.fPaint), GrAA(doStencilMSAA),
std::move(path));
- args.fRenderTargetContext->addDrawOp(args.fClip, std::move(op));
+ args.fRenderTargetContext->addDrawOp(*args.fClip, std::move(op));
}
return true;