Remove unused base class GrGLSLFragmentBuilder
defines one method that is never used. Change-Id: If8522c5f1ac7447b0d5584e76cdbd2f7d127036b Reviewed-on: https://skia-review.googlesource.com/c/skia/+/300259 Commit-Queue: Michael Ludwig <michaelludwig@google.com> Reviewed-by: Michael Ludwig <michaelludwig@google.com> Auto-Submit: Brian Salomon <bsalomon@google.com>
This commit is contained in:
parent
a6d1e98b65
commit
ffd15eafd9
@ -46,7 +46,7 @@ const char* BlendFuncName(SkBlendMode mode) {
|
||||
SkUNREACHABLE;
|
||||
}
|
||||
|
||||
void AppendMode(GrGLSLFragmentBuilder* fsBuilder,
|
||||
void AppendMode(GrGLSLShaderBuilder* fsBuilder,
|
||||
const char* srcColor,
|
||||
const char* dstColor,
|
||||
const char* outColor,
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
#include "include/core/SkBlendMode.h"
|
||||
|
||||
class GrGLSLFragmentBuilder;
|
||||
class GrGLSLShaderBuilder;
|
||||
|
||||
namespace GrGLSLBlend {
|
||||
/*
|
||||
@ -25,7 +25,7 @@ const char* BlendFuncName(SkBlendMode mode);
|
||||
* Appends GLSL code to fsBuilder that assigns a specified blend of the srcColor and dstColor
|
||||
* variables to the outColor variable.
|
||||
*/
|
||||
void AppendMode(GrGLSLFragmentBuilder* fsBuilder,
|
||||
void AppendMode(GrGLSLShaderBuilder* fsBuilder,
|
||||
const char* srcColor,
|
||||
const char* dstColor,
|
||||
const char* outColor,
|
||||
|
@ -67,7 +67,7 @@ uint8_t GrGLSLFragmentShaderBuilder::KeyForSurfaceOrigin(GrSurfaceOrigin origin)
|
||||
}
|
||||
|
||||
GrGLSLFragmentShaderBuilder::GrGLSLFragmentShaderBuilder(GrGLSLProgramBuilder* program)
|
||||
: GrGLSLFragmentBuilder(program) {
|
||||
: GrGLSLShaderBuilder(program) {
|
||||
fSubstageIndices.push_back(0);
|
||||
}
|
||||
|
||||
@ -276,13 +276,6 @@ bool GrGLSLFragmentShaderBuilder::primaryColorOutputIsInOut() const {
|
||||
fCustomColorOutput->getTypeModifier() == GrShaderVar::TypeModifier::InOut;
|
||||
}
|
||||
|
||||
void GrGLSLFragmentBuilder::declAppendf(const char* fmt, ...) {
|
||||
va_list argp;
|
||||
va_start(argp, fmt);
|
||||
inputs().appendVAList(fmt, argp);
|
||||
va_end(argp);
|
||||
}
|
||||
|
||||
const char* GrGLSLFragmentShaderBuilder::getSecondaryColorOutputName() const {
|
||||
if (this->hasSecondaryOutput()) {
|
||||
return (fProgramBuilder->shaderCaps()->mustDeclareFragmentShaderOutput())
|
||||
|
@ -16,29 +16,13 @@
|
||||
class GrRenderTarget;
|
||||
class GrGLSLVarying;
|
||||
|
||||
/*
|
||||
* This base class encapsulates the common functionality which all processors use to build fragment
|
||||
* shaders.
|
||||
*/
|
||||
class GrGLSLFragmentBuilder : public GrGLSLShaderBuilder {
|
||||
public:
|
||||
GrGLSLFragmentBuilder(GrGLSLProgramBuilder* program) : INHERITED(program) {}
|
||||
virtual ~GrGLSLFragmentBuilder() {}
|
||||
|
||||
// TODO: remove this method.
|
||||
void declAppendf(const char* fmt, ...);
|
||||
|
||||
private:
|
||||
typedef GrGLSLShaderBuilder INHERITED;
|
||||
};
|
||||
|
||||
/*
|
||||
* This class is used by fragment processors to build their fragment code.
|
||||
*/
|
||||
class GrGLSLFPFragmentBuilder : virtual public GrGLSLFragmentBuilder {
|
||||
class GrGLSLFPFragmentBuilder : virtual public GrGLSLShaderBuilder {
|
||||
public:
|
||||
/** Appease the compiler; the derived class initializes GrGLSLFragmentBuilder. */
|
||||
GrGLSLFPFragmentBuilder() : GrGLSLFragmentBuilder(nullptr) {
|
||||
/** Appease the compiler; the derived class initializes GrGLSLShaderBuilder. */
|
||||
GrGLSLFPFragmentBuilder() : GrGLSLShaderBuilder(nullptr) {
|
||||
// Suppress unused warning error
|
||||
(void) fDummyPadding;
|
||||
}
|
||||
@ -105,7 +89,7 @@ private:
|
||||
// to start aligned, even though clang is already correctly offsetting the individual fields
|
||||
// that require the larger alignment. In the current world, this extra padding is sufficient to
|
||||
// correctly initialize GrGLSLXPFragmentBuilder second.
|
||||
char fDummyPadding[4];
|
||||
char fDummyPadding[4] = {};
|
||||
};
|
||||
|
||||
GR_MAKE_BITFIELD_CLASS_OPS(GrGLSLFPFragmentBuilder::ScopeFlags);
|
||||
@ -113,10 +97,10 @@ GR_MAKE_BITFIELD_CLASS_OPS(GrGLSLFPFragmentBuilder::ScopeFlags);
|
||||
/*
|
||||
* This class is used by Xfer processors to build their fragment code.
|
||||
*/
|
||||
class GrGLSLXPFragmentBuilder : virtual public GrGLSLFragmentBuilder {
|
||||
class GrGLSLXPFragmentBuilder : virtual public GrGLSLShaderBuilder {
|
||||
public:
|
||||
/** Appease the compiler; the derived class initializes GrGLSLFragmentBuilder. */
|
||||
GrGLSLXPFragmentBuilder() : GrGLSLFragmentBuilder(nullptr) {}
|
||||
/** Appease the compiler; the derived class initializes GrGLSLShaderBuilder. */
|
||||
GrGLSLXPFragmentBuilder() : GrGLSLShaderBuilder(nullptr) {}
|
||||
|
||||
virtual bool hasCustomColorOutput() const = 0;
|
||||
virtual bool hasSecondaryOutput() const = 0;
|
||||
|
@ -91,7 +91,7 @@ void GrGLSLVaryingHandler::setNoPerspective() {
|
||||
return;
|
||||
}
|
||||
if (const char* extension = caps.noperspectiveInterpolationExtensionString()) {
|
||||
int bit = 1 << GrGLSLFragmentBuilder::kNoPerspectiveInterpolation_GLSLPrivateFeature;
|
||||
int bit = 1 << GrGLSLShaderBuilder::kNoPerspectiveInterpolation_GLSLPrivateFeature;
|
||||
fProgramBuilder->fVS.addFeature(bit, extension);
|
||||
if (fProgramBuilder->primitiveProcessor().willUseGeoShader()) {
|
||||
fProgramBuilder->fGS.addFeature(bit, extension);
|
||||
|
@ -839,7 +839,7 @@ std::unique_ptr<GrFragmentProcessor> GrPerlinNoise2Effect::TestCreate(GrProcesso
|
||||
void GrGLPerlinNoise::emitCode(EmitArgs& args) {
|
||||
const GrPerlinNoise2Effect& pne = args.fFp.cast<GrPerlinNoise2Effect>();
|
||||
|
||||
GrGLSLFragmentBuilder* fragBuilder = args.fFragBuilder;
|
||||
GrGLSLFPFragmentBuilder* fragBuilder = args.fFragBuilder;
|
||||
GrGLSLUniformHandler* uniformHandler = args.fUniformHandler;
|
||||
|
||||
fBaseFrequencyUni = uniformHandler->addUniform(&pne, kFragment_GrShaderFlag, kHalf2_GrSLType,
|
||||
@ -1193,7 +1193,7 @@ std::unique_ptr<GrFragmentProcessor> GrImprovedPerlinNoiseEffect::TestCreate(
|
||||
|
||||
void GrGLImprovedPerlinNoise::emitCode(EmitArgs& args) {
|
||||
const GrImprovedPerlinNoiseEffect& pne = args.fFp.cast<GrImprovedPerlinNoiseEffect>();
|
||||
GrGLSLFragmentBuilder* fragBuilder = args.fFragBuilder;
|
||||
GrGLSLFPFragmentBuilder* fragBuilder = args.fFragBuilder;
|
||||
GrGLSLUniformHandler* uniformHandler = args.fUniformHandler;
|
||||
|
||||
fBaseFrequencyUni = uniformHandler->addUniform(&pne, kFragment_GrShaderFlag, kHalf2_GrSLType,
|
||||
|
@ -44,7 +44,7 @@ class GLBigKeyProcessor : public GrGLSLFragmentProcessor {
|
||||
public:
|
||||
void emitCode(EmitArgs& args) override {
|
||||
// pass through
|
||||
GrGLSLFragmentBuilder* fragBuilder = args.fFragBuilder;
|
||||
GrGLSLFPFragmentBuilder* fragBuilder = args.fFragBuilder;
|
||||
if (args.fInputColor) {
|
||||
fragBuilder->codeAppendf("%s = %s;\n", args.fOutputColor, args.fInputColor);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user