Rename GrGLSLGeometryProcessor to GrGeometryProcessor::ProgramImpl
return from GrGP by unique_ptr, rename factory function to
makeProgramImpl()
Bug: skia:11358
Change-Id: I61dd36f770d2fc0b54de0e0e7b78ac4d3fbd119a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/437741
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
diff --git a/src/gpu/ops/GrDrawAtlasPathOp.cpp b/src/gpu/ops/GrDrawAtlasPathOp.cpp
index bd855e8..db270cb 100644
--- a/src/gpu/ops/GrDrawAtlasPathOp.cpp
+++ b/src/gpu/ops/GrDrawAtlasPathOp.cpp
@@ -54,7 +54,7 @@
fAtlasHelper->getKeyBits(b);
}
const TextureSampler& onTextureSampler(int) const override { return fAtlasAccess; }
- GrGLSLGeometryProcessor* createGLSLInstance(const GrShaderCaps&) const override;
+ std::unique_ptr<ProgramImpl> makeProgramImpl(const GrShaderCaps&) const override;
const bool fUsesLocalCoords;
const GrAtlasInstancedHelper* const fAtlasHelper;
@@ -65,7 +65,7 @@
class Impl;
};
-class DrawAtlasPathShader::Impl : public GrGLSLGeometryProcessor {
+class DrawAtlasPathShader::Impl : public ProgramImpl {
void onEmitCode(EmitArgs& args, GrGPArgs* gpArgs) override {
const auto& shader = args.fGeomProc.cast<DrawAtlasPathShader>();
args.fVaryingHandler->emitAttributes(shader);
@@ -107,8 +107,9 @@
GrGLSLUniformHandler::UniformHandle fAtlasAdjustUniform;
};
-GrGLSLGeometryProcessor* DrawAtlasPathShader::createGLSLInstance(const GrShaderCaps&) const {
- return new Impl();
+std::unique_ptr<GrGeometryProcessor::ProgramImpl> DrawAtlasPathShader::makeProgramImpl(
+ const GrShaderCaps&) const {
+ return std::make_unique<Impl>();
}
} // namespace