Rename GrStrokeOp -> GrStrokeTessellateOp
Bug: skia:10419
Change-Id: I04fecec39610d7519edef8a97f367b329b6eea4c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/366116
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
diff --git a/src/gpu/tessellate/GrStrokeHardwareTessellator.h b/src/gpu/tessellate/GrStrokeHardwareTessellator.h
index f04e206..66daa47 100644
--- a/src/gpu/tessellate/GrStrokeHardwareTessellator.h
+++ b/src/gpu/tessellate/GrStrokeHardwareTessellator.h
@@ -9,7 +9,7 @@
#define GrStrokeHardwareTessellator_DEFINED
#include "include/core/SkStrokeRec.h"
-#include "src/gpu/tessellate/GrStrokeOp.h"
+#include "src/gpu/tessellate/GrStrokeTessellateOp.h"
#include "src/gpu/tessellate/GrStrokeTessellateShader.h"
// Renders opaque, constant-color strokes by decomposing them into standalone tessellation patches.
diff --git a/src/gpu/tessellate/GrStrokeIndirectTessellator.h b/src/gpu/tessellate/GrStrokeIndirectTessellator.h
index 39267d9..54bb7ed 100644
--- a/src/gpu/tessellate/GrStrokeIndirectTessellator.h
+++ b/src/gpu/tessellate/GrStrokeIndirectTessellator.h
@@ -8,7 +8,7 @@
#ifndef GrStrokeIndirectTessellator_DEFINED
#define GrStrokeIndirectTessellator_DEFINED
-#include "src/gpu/tessellate/GrStrokeOp.h"
+#include "src/gpu/tessellate/GrStrokeTessellateOp.h"
struct SkPoint;
namespace skiatest { class Reporter; }
diff --git a/src/gpu/tessellate/GrStrokeOp.cpp b/src/gpu/tessellate/GrStrokeTessellateOp.cpp
similarity index 81%
rename from src/gpu/tessellate/GrStrokeOp.cpp
rename to src/gpu/tessellate/GrStrokeTessellateOp.cpp
index 396f289..72009f5 100644
--- a/src/gpu/tessellate/GrStrokeOp.cpp
+++ b/src/gpu/tessellate/GrStrokeTessellateOp.cpp
@@ -5,7 +5,7 @@
* found in the LICENSE file.
*/
-#include "src/gpu/tessellate/GrStrokeOp.h"
+#include "src/gpu/tessellate/GrStrokeTessellateOp.h"
#include "src/core/SkPathPriv.h"
#include "src/gpu/GrRecordingContextPriv.h"
@@ -14,8 +14,9 @@
#include "src/gpu/tessellate/GrStrokeHardwareTessellator.h"
#include "src/gpu/tessellate/GrStrokeIndirectTessellator.h"
-GrStrokeOp::GrStrokeOp(GrAAType aaType, const SkMatrix& viewMatrix, const SkPath& path,
- const SkStrokeRec& stroke, GrPaint&& paint)
+GrStrokeTessellateOp::GrStrokeTessellateOp(GrAAType aaType, const SkMatrix& viewMatrix,
+ const SkPath& path, const SkStrokeRec& stroke,
+ GrPaint&& paint)
: GrDrawOp(ClassID())
, fAAType(aaType)
, fViewMatrix(viewMatrix)
@@ -32,7 +33,7 @@
this->setBounds(devBounds, HasAABloat(GrAAType::kCoverage == fAAType), IsHairline::kNo);
}
-void GrStrokeOp::visitProxies(const VisitProxyFunc& fn) const {
+void GrStrokeTessellateOp::visitProxies(const VisitProxyFunc& fn) const {
if (fFillProgram) {
fFillProgram->visitFPProxies(fn);
} else if (fStencilProgram) {
@@ -42,7 +43,7 @@
}
}
-GrDrawOp::FixedFunctionFlags GrStrokeOp::fixedFunctionFlags() const {
+GrDrawOp::FixedFunctionFlags GrStrokeTessellateOp::fixedFunctionFlags() const {
// We might not actually end up needing stencil, but won't know for sure until finalize().
// Request it just in case we do end up needing it.
auto flags = FixedFunctionFlags::kUsesStencil;
@@ -52,8 +53,10 @@
return flags;
}
-GrProcessorSet::Analysis GrStrokeOp::finalize(const GrCaps& caps, const GrAppliedClip* clip,
- bool hasMixedSampledCoverage, GrClampType clampType) {
+GrProcessorSet::Analysis GrStrokeTessellateOp::finalize(const GrCaps& caps,
+ const GrAppliedClip* clip,
+ bool hasMixedSampledCoverage,
+ GrClampType clampType) {
// Make sure the finalize happens before combining. We might change fNeedsStencil here.
SkASSERT(fPathList.begin().fCurr->fNext == nullptr);
const GrProcessorSet::Analysis& analysis = fProcessors.finalize(
@@ -63,10 +66,10 @@
return analysis;
}
-GrOp::CombineResult GrStrokeOp::onCombineIfPossible(GrOp* grOp, SkArenaAlloc* alloc,
- const GrCaps&) {
+GrOp::CombineResult GrStrokeTessellateOp::onCombineIfPossible(GrOp* grOp, SkArenaAlloc* alloc,
+ const GrCaps&) {
SkASSERT(grOp->classID() == this->classID());
- auto* op = static_cast<GrStrokeOp*>(grOp);
+ auto* op = static_cast<GrStrokeTessellateOp*>(grOp);
if (fNeedsStencil ||
op->fNeedsStencil ||
fColor != op->fColor ||
@@ -106,7 +109,8 @@
GrUserStencilOp::kReplace,
0xffff>());
-void GrStrokeOp::prePrepareTessellator(GrPathShader::ProgramArgs&& args, GrAppliedClip&& clip) {
+void GrStrokeTessellateOp::prePrepareTessellator(GrPathShader::ProgramArgs&& args,
+ GrAppliedClip&& clip) {
SkASSERT(!fTessellator);
SkASSERT(!fFillProgram);
SkASSERT(!fStencilProgram);
@@ -159,10 +163,11 @@
fillStencil);
}
-void GrStrokeOp::onPrePrepare(GrRecordingContext* context, const GrSurfaceProxyView& writeView,
- GrAppliedClip* clip,
- const GrXferProcessor::DstProxyView& dstProxyView,
- GrXferBarrierFlags renderPassXferBarriers, GrLoadOp colorLoadOp) {
+void GrStrokeTessellateOp::onPrePrepare(GrRecordingContext* context,
+ const GrSurfaceProxyView& writeView, GrAppliedClip* clip,
+ const GrXferProcessor::DstProxyView& dstProxyView,
+ GrXferBarrierFlags renderPassXferBarriers, GrLoadOp
+ colorLoadOp) {
this->prePrepareTessellator({context->priv().recordTimeAllocator(), writeView, &dstProxyView,
renderPassXferBarriers, colorLoadOp, context->priv().caps()},
(clip) ? std::move(*clip) : GrAppliedClip::Disabled());
@@ -174,7 +179,7 @@
}
}
-void GrStrokeOp::onPrepare(GrOpFlushState* flushState) {
+void GrStrokeTessellateOp::onPrepare(GrOpFlushState* flushState) {
if (!fTessellator) {
this->prePrepareTessellator({flushState->allocator(), flushState->writeView(),
&flushState->dstProxyView(), flushState->renderPassBarriers(),
@@ -185,7 +190,7 @@
fTessellator->prepare(flushState, fViewMatrix, fPathList, fStroke, fTotalCombinedVerbCnt);
}
-void GrStrokeOp::onExecute(GrOpFlushState* flushState, const SkRect& chainBounds) {
+void GrStrokeTessellateOp::onExecute(GrOpFlushState* flushState, const SkRect& chainBounds) {
SkASSERT(chainBounds == this->bounds());
if (fStencilProgram) {
flushState->bindPipelineAndScissorClip(*fStencilProgram, this->bounds());
diff --git a/src/gpu/tessellate/GrStrokeOp.h b/src/gpu/tessellate/GrStrokeTessellateOp.h
similarity index 90%
rename from src/gpu/tessellate/GrStrokeOp.h
rename to src/gpu/tessellate/GrStrokeTessellateOp.h
index 6a2933d..4a63d0a 100644
--- a/src/gpu/tessellate/GrStrokeOp.h
+++ b/src/gpu/tessellate/GrStrokeTessellateOp.h
@@ -5,8 +5,8 @@
* found in the LICENSE file.
*/
-#ifndef GrStrokeOp_DEFINED
-#define GrStrokeOp_DEFINED
+#ifndef GrStrokeTessellateOp_DEFINED
+#define GrStrokeTessellateOp_DEFINED
#include "include/core/SkStrokeRec.h"
#include "src/gpu/GrSTArenaList.h"
@@ -31,19 +31,19 @@
// Base class for ops that render opaque, constant-color strokes by linearizing them into sorted
// "parametric" and "radial" edges. See GrStrokeTessellateShader.
-class GrStrokeOp : public GrDrawOp {
+class GrStrokeTessellateOp : public GrDrawOp {
public:
// The provided matrix must be a similarity matrix for the time being. This is so we can
// bootstrap this Op on top of GrStrokeGeometry with minimal modifications.
//
// Patches can overlap, so until a stencil technique is implemented, the provided paint must be
// a constant blended color.
- GrStrokeOp(GrAAType, const SkMatrix&, const SkPath&, const SkStrokeRec&, GrPaint&&);
+ GrStrokeTessellateOp(GrAAType, const SkMatrix&, const SkPath&, const SkStrokeRec&, GrPaint&&);
protected:
DEFINE_OP_CLASS_ID
- const char* name() const override { return "GrStrokeOp"; }
+ const char* name() const override { return "GrStrokeTessellateOp"; }
void visitProxies(const VisitProxyFunc& fn) const override;
FixedFunctionFlags fixedFunctionFlags() const override;
GrProcessorSet::Analysis finalize(const GrCaps&, const GrAppliedClip*,
diff --git a/src/gpu/tessellate/GrTessellationPathRenderer.cpp b/src/gpu/tessellate/GrTessellationPathRenderer.cpp
index eddcb4e..e4560fa 100644
--- a/src/gpu/tessellate/GrTessellationPathRenderer.cpp
+++ b/src/gpu/tessellate/GrTessellationPathRenderer.cpp
@@ -18,7 +18,7 @@
#include "src/gpu/ops/GrFillRectOp.h"
#include "src/gpu/tessellate/GrDrawAtlasPathOp.h"
#include "src/gpu/tessellate/GrPathInnerTriangulateOp.h"
-#include "src/gpu/tessellate/GrStrokeOp.h"
+#include "src/gpu/tessellate/GrStrokeTessellateOp.h"
#include "src/gpu/tessellate/GrTessellatingStencilFillOp.h"
#include "src/gpu/tessellate/GrWangsFormula.h"
@@ -211,7 +211,8 @@
if (!shape.style().isSimpleFill()) {
const SkStrokeRec& stroke = shape.style().strokeRec();
SkASSERT(stroke.getStyle() != SkStrokeRec::kStrokeAndFill_Style);
- return GrOp::Make<GrStrokeOp>(rContext, aaType, viewMatrix, path, stroke, std::move(paint));
+ return GrOp::Make<GrStrokeTessellateOp>(rContext, aaType, viewMatrix, path, stroke,
+ std::move(paint));
} else {
if ((1 << worstCaseResolveLevel) > shaderCaps.maxTessellationSegments()) {
// The path is too large for hardware tessellation; a curve in this bounding box could