1 2 3 /************************************************************************************************** 4 *** This file was autogenerated from GrSectionTest.fp; do not modify. 5 **************************************************************************************************/ 6 #include "GrSectionTest.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 GrGLSLSectionTest : public GrGLSLFragmentProcessor { 16 public: GrGLSLSectionTest()17 GrGLSLSectionTest() {} emitCode(EmitArgs & args)18 void emitCode(EmitArgs& args) override { 19 GrGLSLFPFragmentBuilder* fragBuilder = args.fFragBuilder; 20 const GrSectionTest& _outer = args.fFp.cast<GrSectionTest>(); 21 (void) _outer; 22 fragBuilder->codeAppendf( 23 R"SkSL(return half4(1.0); 24 )SkSL" 25 ); 26 } 27 private: onSetData(const GrGLSLProgramDataManager & pdman,const GrFragmentProcessor & _proc)28 void onSetData(const GrGLSLProgramDataManager& pdman, const GrFragmentProcessor& _proc) override { 29 } 30 }; onMakeProgramImpl() const31std::unique_ptr<GrGLSLFragmentProcessor> GrSectionTest::onMakeProgramImpl() const { 32 return std::make_unique<GrGLSLSectionTest>(); 33 } onGetGLSLProcessorKey(const GrShaderCaps & caps,GrProcessorKeyBuilder * b) const34void GrSectionTest::onGetGLSLProcessorKey(const GrShaderCaps& caps, GrProcessorKeyBuilder* b) const { 35 } onIsEqual(const GrFragmentProcessor & other) const36bool GrSectionTest::onIsEqual(const GrFragmentProcessor& other) const { 37 const GrSectionTest& that = other.cast<GrSectionTest>(); 38 (void) that; 39 return true; 40 } GrSectionTest(const GrSectionTest & src)41GrSectionTest::GrSectionTest(const GrSectionTest& src) 42 : INHERITED(kGrSectionTest_ClassID, src.optimizationFlags()) { 43 this->cloneAndRegisterAllChildProcessors(src); 44 } clone() const45std::unique_ptr<GrFragmentProcessor> GrSectionTest::clone() const { 46 return std::make_unique<GrSectionTest>(*this); 47 } 48 #if GR_TEST_UTILS onDumpInfo() const49SkString GrSectionTest::onDumpInfo() const { 50 return SkString(); 51 } 52 #endif 53 GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrSectionTest); 54 #if GR_TEST_UTILS TestCreate(GrProcessorTestData * testDataName)55std::unique_ptr<GrFragmentProcessor> GrSectionTest::TestCreate(GrProcessorTestData* testDataName) { 56 testDataName section} 57 #endif 58