Rename GrTessellatingStencilFillOp -> GrPathStencilFillOp
This makes the class name conform to the same pattern as the other
tessellation ops: stroke tessellation ops begin with GrStroke* and
fill tessellation ops now begin with GrPath*.
Change-Id: I454341ec95438637ee2a4e501a374f8f59622550
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/405018
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/tessellate/GrTessellatingStencilFillOp.cpp b/src/gpu/tessellate/GrPathStencilFillOp.cpp
similarity index 85%
rename from src/gpu/tessellate/GrTessellatingStencilFillOp.cpp
rename to src/gpu/tessellate/GrPathStencilFillOp.cpp
index 6a23adb..fec05f0 100644
--- a/src/gpu/tessellate/GrTessellatingStencilFillOp.cpp
+++ b/src/gpu/tessellate/GrPathStencilFillOp.cpp
@@ -5,7 +5,7 @@
* found in the LICENSE file.
*/
-#include "src/gpu/tessellate/GrTessellatingStencilFillOp.h"
+#include "src/gpu/tessellate/GrPathStencilFillOp.h"
#include "src/gpu/GrEagerVertexAllocator.h"
#include "src/gpu/GrOpFlushState.h"
@@ -18,7 +18,7 @@
using OpFlags = GrTessellationPathRenderer::OpFlags;
-void GrTessellatingStencilFillOp::visitProxies(const VisitProxyFunc& fn) const {
+void GrPathStencilFillOp::visitProxies(const VisitProxyFunc& fn) const {
if (fFillBBoxProgram) {
fFillBBoxProgram->pipeline().visitProxies(fn);
} else {
@@ -26,7 +26,7 @@
}
}
-GrDrawOp::FixedFunctionFlags GrTessellatingStencilFillOp::fixedFunctionFlags() const {
+GrDrawOp::FixedFunctionFlags GrPathStencilFillOp::fixedFunctionFlags() const {
auto flags = FixedFunctionFlags::kUsesStencil;
if (fAAType != GrAAType::kNone) {
flags |= FixedFunctionFlags::kUsesHWAA;
@@ -34,15 +34,15 @@
return flags;
}
-GrProcessorSet::Analysis GrTessellatingStencilFillOp::finalize(const GrCaps& caps,
- const GrAppliedClip* clip,
- GrClampType clampType) {
+GrProcessorSet::Analysis GrPathStencilFillOp::finalize(const GrCaps& caps,
+ const GrAppliedClip* clip,
+ GrClampType clampType) {
return fProcessors.finalize(fColor, GrProcessorAnalysisCoverage::kNone, clip, nullptr, caps,
clampType, &fColor);
}
-void GrTessellatingStencilFillOp::prePreparePrograms(const GrPathShader::ProgramArgs& args,
- GrAppliedClip&& appliedClip) {
+void GrPathStencilFillOp::prePreparePrograms(const GrPathShader::ProgramArgs& args,
+ GrAppliedClip&& appliedClip) {
using DrawInnerFan = GrPathIndirectTessellator::DrawInnerFan;
SkASSERT(!fStencilFanProgram);
SkASSERT(!fStencilPathProgram);
@@ -108,12 +108,11 @@
}
}
-void GrTessellatingStencilFillOp::onPrePrepare(GrRecordingContext* context,
- const GrSurfaceProxyView& writeView,
- GrAppliedClip* clip,
- const GrXferProcessor::DstProxyView& dstProxyView,
- GrXferBarrierFlags renderPassXferBarriers,
- GrLoadOp colorLoadOp) {
+void GrPathStencilFillOp::onPrePrepare(GrRecordingContext* context,
+ const GrSurfaceProxyView& writeView, GrAppliedClip* clip,
+ const GrXferProcessor::DstProxyView& dstProxyView,
+ GrXferBarrierFlags renderPassXferBarriers,
+ GrLoadOp colorLoadOp) {
this->prePreparePrograms({context->priv().recordTimeAllocator(), writeView, &dstProxyView,
renderPassXferBarriers, colorLoadOp, context->priv().caps()},
(clip) ? std::move(*clip) : GrAppliedClip::Disabled());
@@ -128,7 +127,7 @@
}
}
-void GrTessellatingStencilFillOp::onPrepare(GrOpFlushState* flushState) {
+void GrPathStencilFillOp::onPrepare(GrOpFlushState* flushState) {
if (!fTessellator) {
this->prePreparePrograms({flushState->allocator(), flushState->writeView(),
&flushState->dstProxyView(), flushState->renderPassBarriers(),
@@ -154,7 +153,7 @@
fTessellator->prepare(flushState, fViewMatrix, fPath);
}
-void GrTessellatingStencilFillOp::onExecute(GrOpFlushState* flushState, const SkRect& chainBounds) {
+void GrPathStencilFillOp::onExecute(GrOpFlushState* flushState, const SkRect& chainBounds) {
if (!fTessellator) {
return;
}
diff --git a/src/gpu/tessellate/GrTessellatingStencilFillOp.h b/src/gpu/tessellate/GrPathStencilFillOp.h
similarity index 85%
rename from src/gpu/tessellate/GrTessellatingStencilFillOp.h
rename to src/gpu/tessellate/GrPathStencilFillOp.h
index ec2e83d..cfecd47 100644
--- a/src/gpu/tessellate/GrTessellatingStencilFillOp.h
+++ b/src/gpu/tessellate/GrPathStencilFillOp.h
@@ -5,8 +5,8 @@
* found in the LICENSE file.
*/
-#ifndef GrTessellatingStencilFillOp_DEFINED
-#define GrTessellatingStencilFillOp_DEFINED
+#ifndef GrPathStencilFillOp_DEFINED
+#define GrPathStencilFillOp_DEFINED
#include "src/gpu/ops/GrDrawOp.h"
#include "src/gpu/tessellate/GrPathShader.h"
@@ -17,12 +17,12 @@
// Draws paths using a standard Redbook "stencil then fill" method. Curves get linearized by either
// GPU tessellation shaders or indirect draws. This Op doesn't apply analytic AA, so it requires
// MSAA if AA is desired.
-class GrTessellatingStencilFillOp : public GrDrawOp {
+class GrPathStencilFillOp : public GrDrawOp {
private:
DEFINE_OP_CLASS_ID
- GrTessellatingStencilFillOp(const SkMatrix& viewMatrix, const SkPath& path, GrPaint&& paint,
- GrAAType aaType, GrTessellationPathRenderer::OpFlags opFlags)
+ GrPathStencilFillOp(const SkMatrix& viewMatrix, const SkPath& path, GrPaint&& paint,
+ GrAAType aaType, GrTessellationPathRenderer::OpFlags opFlags)
: GrDrawOp(ClassID())
, fOpFlags(opFlags)
, fViewMatrix(viewMatrix)
@@ -35,7 +35,7 @@
this->setBounds(devBounds, HasAABloat::kNo, IsHairline::kNo);
}
- const char* name() const override { return "GrTessellatingStencilFillOp"; }
+ const char* name() const override { return "GrPathStencilFillOp"; }
void visitProxies(const VisitProxyFunc& fn) const override;
FixedFunctionFlags fixedFunctionFlags() const override;
GrProcessorSet::Analysis finalize(const GrCaps&, const GrAppliedClip*, GrClampType) override;
diff --git a/src/gpu/tessellate/GrTessellationPathRenderer.cpp b/src/gpu/tessellate/GrTessellationPathRenderer.cpp
index 8804a4a..106efd2 100644
--- a/src/gpu/tessellate/GrTessellationPathRenderer.cpp
+++ b/src/gpu/tessellate/GrTessellationPathRenderer.cpp
@@ -18,8 +18,8 @@
#include "src/gpu/ops/GrFillRectOp.h"
#include "src/gpu/tessellate/GrDrawAtlasPathOp.h"
#include "src/gpu/tessellate/GrPathInnerTriangulateOp.h"
+#include "src/gpu/tessellate/GrPathStencilFillOp.h"
#include "src/gpu/tessellate/GrStrokeTessellateOp.h"
-#include "src/gpu/tessellate/GrTessellatingStencilFillOp.h"
#include "src/gpu/tessellate/GrWangsFormula.h"
constexpr static SkISize kAtlasInitialSize{512, 512};
@@ -239,8 +239,8 @@
std::move(paint), aaType, opFlags);
}
}
- return GrOp::Make<GrTessellatingStencilFillOp>(rContext, viewMatrix, path, std::move(paint),
- aaType, opFlags);
+ return GrOp::Make<GrPathStencilFillOp>(rContext, viewMatrix, path, std::move(paint), aaType,
+ opFlags);
}
}
@@ -410,8 +410,9 @@
}
uberPath->setFillType(fillType);
GrAAType aaType = (antialias) ? GrAAType::kMSAA : GrAAType::kNone;
- auto op = GrOp::Make<GrTessellatingStencilFillOp>(onFlushRP->recordingContext(),
- SkMatrix::I(), *uberPath, GrPaint(), aaType, fStencilAtlasFlags);
+ auto op = GrOp::Make<GrPathStencilFillOp>(onFlushRP->recordingContext(), SkMatrix::I(),
+ *uberPath, GrPaint(), aaType,
+ fStencilAtlasFlags);
rtc->addDrawOp(nullptr, std::move(op));
}
}