1 2 3 /************************************************************************************************** 4 *** This file was autogenerated from GrSectionConstructorParams.fp; do not modify. 5 **************************************************************************************************/ 6 #include "GrSectionConstructorParams.h" 7 8 #include "src/core/SkUtils.h" 9 #include "src/gpu/GrTexture.h" 10 #include "src/gpu/glsl/GrGLSLFragmentProcessor.h" 11 #include "src/gpu/glsl/GrGLSLFragmentShaderBuilder.h" 12 #include "src/gpu/glsl/GrGLSLProgramBuilder.h" 13 #include "src/sksl/SkSLCPP.h" 14 #include "src/sksl/SkSLUtil.h" 15 class GrGLSLSectionConstructorParams : public GrGLSLFragmentProcessor { 16 public: GrGLSLSectionConstructorParams()17 GrGLSLSectionConstructorParams() {} emitCode(EmitArgs & args)18 void emitCode(EmitArgs& args) override { 19 GrGLSLFPFragmentBuilder* fragBuilder = args.fFragBuilder; 20 const GrSectionConstructorParams& _outer = args.fFp.cast<GrSectionConstructorParams>(); 21 (void) _outer; 22 auto w = _outer.w; 23 (void) w; 24 fragBuilder->codeAppendf( 25 R"SkSL(return half4(1.0); 26 )SkSL" 27 ); 28 } 29 private: onSetData(const GrGLSLProgramDataManager & pdman,const GrFragmentProcessor & _proc)30 void onSetData(const GrGLSLProgramDataManager& pdman, const GrFragmentProcessor& _proc) override { 31 } 32 }; onMakeProgramImpl() const33std::unique_ptr<GrGLSLFragmentProcessor> GrSectionConstructorParams::onMakeProgramImpl() const { 34 return std::make_unique<GrGLSLSectionConstructorParams>(); 35 } onGetGLSLProcessorKey(const GrShaderCaps & caps,GrProcessorKeyBuilder * b) const36void GrSectionConstructorParams::onGetGLSLProcessorKey(const GrShaderCaps& caps, GrProcessorKeyBuilder* b) const { 37 } onIsEqual(const GrFragmentProcessor & other) const38bool GrSectionConstructorParams::onIsEqual(const GrFragmentProcessor& other) const { 39 const GrSectionConstructorParams& that = other.cast<GrSectionConstructorParams>(); 40 (void) that; 41 if (w != that.w) return false; 42 return true; 43 } GrSectionConstructorParams(const GrSectionConstructorParams & src)44GrSectionConstructorParams::GrSectionConstructorParams(const GrSectionConstructorParams& src) 45 : INHERITED(kGrSectionConstructorParams_ClassID, src.optimizationFlags()) 46 , w(src.w) { 47 this->cloneAndRegisterAllChildProcessors(src); 48 } clone() const49std::unique_ptr<GrFragmentProcessor> GrSectionConstructorParams::clone() const { 50 return std::make_unique<GrSectionConstructorParams>(*this); 51 } 52 #if GR_TEST_UTILS onDumpInfo() const53SkString GrSectionConstructorParams::onDumpInfo() const { 54 return SkStringPrintf("(w=%f)", w); 55 } 56 #endif 57