

/**************************************************************************************************
 *** This file was autogenerated from GrNonInlinedInUniform.fp; do not modify.
 **************************************************************************************************/
#include "GrNonInlinedInUniform.h"

#include "src/core/SkUtils.h"
#include "src/gpu/GrTexture.h"
#include "src/gpu/glsl/GrGLSLFragmentProcessor.h"
#include "src/gpu/glsl/GrGLSLFragmentShaderBuilder.h"
#include "src/gpu/glsl/GrGLSLProgramBuilder.h"
#include "src/sksl/SkSLCPP.h"
#include "src/sksl/SkSLUtil.h"
class GrGLSLNonInlinedInUniform : public GrGLSLFragmentProcessor {
public:
    GrGLSLNonInlinedInUniform() {}
    void emitCode(EmitArgs& args) override {
        GrGLSLFPFragmentBuilder* fragBuilder = args.fFragBuilder;
        const GrNonInlinedInUniform& _outer = args.fFp.cast<GrNonInlinedInUniform>();
        (void) _outer;
        auto point = _outer.point;
        (void) point;
        pointVar = args.fUniformHandler->addUniform(&_outer, kFragment_GrShaderFlag, kHalf2_GrSLType, "point");
        fragBuilder->codeAppendf(
R"SkSL(return half4(%s, %s);
)SkSL"
, args.fUniformHandler->getUniformCStr(pointVar), args.fUniformHandler->getUniformCStr(pointVar));
    }
private:
    void onSetData(const GrGLSLProgramDataManager& pdman, const GrFragmentProcessor& _proc) override {
        const GrNonInlinedInUniform& _outer = _proc.cast<GrNonInlinedInUniform>();
        {
        const SkPoint& pointValue = _outer.point;
        pdman.set2f(pointVar, pointValue.fX, pointValue.fY);
        }
    }
    UniformHandle pointVar;
};
GrGLSLFragmentProcessor* GrNonInlinedInUniform::onCreateGLSLInstance() const {
    return new GrGLSLNonInlinedInUniform();
}
void GrNonInlinedInUniform::onGetGLSLProcessorKey(const GrShaderCaps& caps, GrProcessorKeyBuilder* b) const {
}
bool GrNonInlinedInUniform::onIsEqual(const GrFragmentProcessor& other) const {
    const GrNonInlinedInUniform& that = other.cast<GrNonInlinedInUniform>();
    (void) that;
    if (point != that.point) return false;
    return true;
}
GrNonInlinedInUniform::GrNonInlinedInUniform(const GrNonInlinedInUniform& src)
: INHERITED(kGrNonInlinedInUniform_ClassID, src.optimizationFlags())
, point(src.point) {
        this->cloneAndRegisterAllChildProcessors(src);
}
std::unique_ptr<GrFragmentProcessor> GrNonInlinedInUniform::clone() const {
    return std::make_unique<GrNonInlinedInUniform>(*this);
}
#if GR_TEST_UTILS
SkString GrNonInlinedInUniform::onDumpInfo() const {
    return SkStringPrintf("(point=half2(%f, %f))", point.fX, point.fY);
}
#endif
