Hide path tessellation shaders in private files
Replaces the public class definitions with factory methods. Separates
the class definitions into their own separate files.
Bug: skia:10419
Change-Id: I574d920d5a3d0dc98fa5eb231c9b510e04aebf78
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/413796
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/tessellate/GrPathStencilFillOp.cpp b/src/gpu/tessellate/GrPathStencilFillOp.cpp
index 1ea8075..a92e1db 100644
--- a/src/gpu/tessellate/GrPathStencilFillOp.cpp
+++ b/src/gpu/tessellate/GrPathStencilFillOp.cpp
@@ -34,7 +34,7 @@
}
private:
- const char* name() const final { return "BoundingBoxShader"; }
+ const char* name() const final { return "tessellate_BoundingBoxShader"; }
void getGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const final {}
GrGLSLGeometryProcessor* createGLSLInstance(const GrShaderCaps&) const final;
};
@@ -110,7 +110,8 @@
// Large complex paths do better with a dedicated triangle shader for the inner fan.
// This takes less PCI bus bandwidth (6 floats per triangle instead of 8) and allows us
// to make sure it has an efficient middle-out topology.
- auto shader = args.fArena->make<GrTriangleShader>(fViewMatrix, SK_PMColor4fTRANSPARENT);
+ auto shader = GrPathTessellationShader::MakeSimpleTriangleShader(
+ args.fArena, fViewMatrix, SK_PMColor4fTRANSPARENT);
fStencilFanProgram = GrTessellationShader::MakeProgram(args, shader, stencilPipeline,
stencilPathSettings);
drawFanWithTessellator = GrPathTessellator::DrawInnerFan::kNo;