Rename GrPathStencilFillOp -> GrTessellatingStencilFillOp

Bug: skia:10419
Change-Id: I5c23a0ccbe45634e9d2740789f0cbe44ca0292c4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/360957
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
This commit is contained in:
Chris Dalton 2021-01-27 17:45:52 -07:00 committed by Skia Commit-Bot
parent a982c77a0a
commit b03f4a1dc8
5 changed files with 32 additions and 31 deletions

View File

@ -473,8 +473,6 @@ skia_gpu_sources = [
"$_src/gpu/tessellate/GrMiddleOutPolygonTriangulator.h",
"$_src/gpu/tessellate/GrMidpointContourParser.h",
"$_src/gpu/tessellate/GrPathShader.h",
"$_src/gpu/tessellate/GrPathStencilFillOp.cpp",
"$_src/gpu/tessellate/GrPathStencilFillOp.h",
"$_src/gpu/tessellate/GrPathTessellateOp.cpp",
"$_src/gpu/tessellate/GrPathTessellateOp.h",
"$_src/gpu/tessellate/GrPathTessellator.cpp",
@ -490,6 +488,8 @@ skia_gpu_sources = [
"$_src/gpu/tessellate/GrStrokeTessellateOp.h",
"$_src/gpu/tessellate/GrStrokeTessellateShader.cpp",
"$_src/gpu/tessellate/GrStrokeTessellateShader.h",
"$_src/gpu/tessellate/GrTessellatingStencilFillOp.cpp",
"$_src/gpu/tessellate/GrTessellatingStencilFillOp.h",
"$_src/gpu/tessellate/GrTessellationPathRenderer.cpp",
"$_src/gpu/tessellate/GrTessellationPathRenderer.h",
"$_src/gpu/tessellate/GrVectorXform.h",

View File

@ -19,7 +19,7 @@
#include "src/gpu/GrMemoryPool.h"
#include "src/gpu/GrRecordingContextPriv.h"
#include "src/gpu/GrSurfaceDrawContext.h"
#include "src/gpu/tessellate/GrPathTessellateOp.h"
#include "src/gpu/tessellate/GrTessellatingStencilFillOp.h"
#include "src/gpu/tessellate/GrWangsFormula.h"
static float kConicWeight = .5;
@ -94,8 +94,8 @@ void TessellatedWedge::onDrawContent(SkCanvas* canvas) {
aa = GrAAType::kNone;
}
sdc->addDrawOp(GrOp::Make<GrPathTessellateOp>(ctx, canvas->getTotalMatrix(), fPath,
std::move(paint), aa, fOpFlags));
sdc->addDrawOp(GrOp::Make<GrTessellatingStencilFillOp>(ctx, canvas->getTotalMatrix(), fPath,
std::move(paint), aa, fOpFlags));
// Draw the path points.
SkPaint pointsPaint;

View File

@ -5,7 +5,7 @@
* found in the LICENSE file.
*/
#include "src/gpu/tessellate/GrPathStencilFillOp.h"
#include "src/gpu/tessellate/GrTessellatingStencilFillOp.h"
#include "src/gpu/GrEagerVertexAllocator.h"
#include "src/gpu/GrOpFlushState.h"
@ -18,7 +18,7 @@
using OpFlags = GrTessellationPathRenderer::OpFlags;
void GrPathStencilFillOp::visitProxies(const VisitProxyFunc& fn) const {
void GrTessellatingStencilFillOp::visitProxies(const VisitProxyFunc& fn) const {
if (fFillBBoxProgram) {
fFillBBoxProgram->pipeline().visitProxies(fn);
} else {
@ -26,7 +26,7 @@ void GrPathStencilFillOp::visitProxies(const VisitProxyFunc& fn) const {
}
}
GrDrawOp::FixedFunctionFlags GrPathStencilFillOp::fixedFunctionFlags() const {
GrDrawOp::FixedFunctionFlags GrTessellatingStencilFillOp::fixedFunctionFlags() const {
auto flags = FixedFunctionFlags::kUsesStencil;
if (fAAType != GrAAType::kNone) {
flags |= FixedFunctionFlags::kUsesHWAA;
@ -34,16 +34,16 @@ GrDrawOp::FixedFunctionFlags GrPathStencilFillOp::fixedFunctionFlags() const {
return flags;
}
GrProcessorSet::Analysis GrPathStencilFillOp::finalize(const GrCaps& caps,
const GrAppliedClip* clip,
bool hasMixedSampledCoverage,
GrClampType clampType) {
GrProcessorSet::Analysis GrTessellatingStencilFillOp::finalize(const GrCaps& caps,
const GrAppliedClip* clip,
bool hasMixedSampledCoverage,
GrClampType clampType) {
return fProcessors.finalize(fColor, GrProcessorAnalysisCoverage::kNone, clip, nullptr,
hasMixedSampledCoverage, caps, clampType, &fColor);
}
void GrPathStencilFillOp::prePreparePrograms(const GrPathShader::ProgramArgs& args,
GrAppliedClip&& appliedClip) {
void GrTessellatingStencilFillOp::prePreparePrograms(const GrPathShader::ProgramArgs& args,
GrAppliedClip&& appliedClip) {
using DrawInnerFan = GrPathIndirectTessellator::DrawInnerFan;
SkASSERT(!fStencilFanProgram);
SkASSERT(!fStencilPathProgram);
@ -109,11 +109,12 @@ void GrPathStencilFillOp::prePreparePrograms(const GrPathShader::ProgramArgs& ar
}
}
void GrPathStencilFillOp::onPrePrepare(GrRecordingContext* context,
const GrSurfaceProxyView& writeView, GrAppliedClip* clip,
const GrXferProcessor::DstProxyView& dstProxyView,
GrXferBarrierFlags renderPassXferBarriers,
GrLoadOp colorLoadOp) {
void GrTessellatingStencilFillOp::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 +129,7 @@ void GrPathStencilFillOp::onPrePrepare(GrRecordingContext* context,
}
}
void GrPathStencilFillOp::onPrepare(GrOpFlushState* flushState) {
void GrTessellatingStencilFillOp::onPrepare(GrOpFlushState* flushState) {
if (!fTessellator) {
this->prePreparePrograms({flushState->allocator(), flushState->writeView(),
&flushState->dstProxyView(), flushState->renderPassBarriers(),
@ -154,7 +155,7 @@ void GrPathStencilFillOp::onPrepare(GrOpFlushState* flushState) {
fTessellator->prepare(flushState, fViewMatrix, fPath);
}
void GrPathStencilFillOp::onExecute(GrOpFlushState* flushState, const SkRect& chainBounds) {
void GrTessellatingStencilFillOp::onExecute(GrOpFlushState* flushState, const SkRect& chainBounds) {
if (!fTessellator) {
return;
}

View File

@ -5,8 +5,8 @@
* found in the LICENSE file.
*/
#ifndef GrPathStencilFillOp_DEFINED
#define GrPathStencilFillOp_DEFINED
#ifndef GrTessellatingStencilFillOp_DEFINED
#define GrTessellatingStencilFillOp_DEFINED
#include "src/gpu/ops/GrDrawOp.h"
#include "src/gpu/tessellate/GrPathShader.h"
@ -17,12 +17,12 @@ class GrPathTessellator;
// 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 a
// render target that supports either MSAA or mixed samples if AA is desired.
class GrPathStencilFillOp : public GrDrawOp {
class GrTessellatingStencilFillOp : public GrDrawOp {
private:
DEFINE_OP_CLASS_ID
GrPathStencilFillOp(const SkMatrix& viewMatrix, const SkPath& path, GrPaint&& paint,
GrAAType aaType, GrTessellationPathRenderer::OpFlags opFlags)
GrTessellatingStencilFillOp(const SkMatrix& viewMatrix, const SkPath& path, GrPaint&& paint,
GrAAType aaType, GrTessellationPathRenderer::OpFlags opFlags)
: GrDrawOp(ClassID())
, fOpFlags(opFlags)
, fViewMatrix(viewMatrix)
@ -35,7 +35,7 @@ private:
this->setBounds(devBounds, HasAABloat(GrAAType::kCoverage == fAAType), IsHairline::kNo);
}
const char* name() const override { return "GrPathStencilFillOp"; }
const char* name() const override { return "GrTessellatingStencilFillOp"; }
void visitProxies(const VisitProxyFunc& fn) const override;
FixedFunctionFlags fixedFunctionFlags() const override;
GrProcessorSet::Analysis finalize(const GrCaps&, const GrAppliedClip*,

View File

@ -17,10 +17,10 @@
#include "src/gpu/geometry/GrStyledShape.h"
#include "src/gpu/ops/GrFillRectOp.h"
#include "src/gpu/tessellate/GrDrawAtlasPathOp.h"
#include "src/gpu/tessellate/GrPathStencilFillOp.h"
#include "src/gpu/tessellate/GrPathTessellateOp.h"
#include "src/gpu/tessellate/GrStrokeIndirectOp.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};
@ -251,8 +251,8 @@ static GrOp::Owner make_op(GrRecordingContext* rContext, const GrSurfaceContext*
aaType, opFlags);
}
}
return GrOp::Make<GrPathStencilFillOp>(rContext, viewMatrix, path, std::move(paint), aaType,
opFlags);
return GrOp::Make<GrTessellatingStencilFillOp>(rContext, viewMatrix, path, std::move(paint),
aaType, opFlags);
}
}
@ -422,7 +422,7 @@ void GrTessellationPathRenderer::renderAtlas(GrOnFlushResourceProvider* onFlushR
}
uberPath->setFillType(fillType);
GrAAType aaType = (antialias) ? GrAAType::kMSAA : GrAAType::kNone;
auto op = GrOp::Make<GrPathStencilFillOp>(onFlushRP->recordingContext(),
auto op = GrOp::Make<GrTessellatingStencilFillOp>(onFlushRP->recordingContext(),
SkMatrix::I(), *uberPath, GrPaint(), aaType, fStencilAtlasFlags);
rtc->addDrawOp(nullptr, std::move(op));
}