2021-04-22 19:05:20 +00:00
|
|
|
/* HELLO WORLD */
|
|
|
|
|
|
|
|
/**************************************************************************************************
|
|
|
|
*** This file was autogenerated from GrDSLFPTest_HelloWorld.fp; do not modify.
|
|
|
|
**************************************************************************************************/
|
|
|
|
/* TODO(skia:11854): DSLCPPCodeGenerator is currently a work in progress. */
|
|
|
|
#include "GrDSLFPTest_HelloWorld.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"
|
|
|
|
#include "src/sksl/dsl/priv/DSLFPs.h"
|
|
|
|
#include "src/sksl/dsl/priv/DSLWriter.h"
|
|
|
|
|
|
|
|
class GrGLSLDSLFPTest_HelloWorld : public GrGLSLFragmentProcessor {
|
|
|
|
public:
|
|
|
|
GrGLSLDSLFPTest_HelloWorld() {}
|
|
|
|
void emitCode(EmitArgs& args) override {
|
2021-04-26 15:40:41 +00:00
|
|
|
[[maybe_unused]] const GrDSLFPTest_HelloWorld& _outer = args.fFp.cast<GrDSLFPTest_HelloWorld>();
|
2021-04-22 19:05:20 +00:00
|
|
|
|
|
|
|
using namespace SkSL::dsl;
|
|
|
|
StartFragmentProcessor(this, &args);
|
2021-04-23 22:09:42 +00:00
|
|
|
Return(Half4(0.0f, 1.0f, 0.0f, 1.0f));
|
2021-04-22 19:05:20 +00:00
|
|
|
EndFragmentProcessor();
|
|
|
|
}
|
|
|
|
private:
|
|
|
|
void onSetData(const GrGLSLProgramDataManager& pdman, const GrFragmentProcessor& _proc) override {
|
|
|
|
}
|
|
|
|
};
|
|
|
|
std::unique_ptr<GrGLSLFragmentProcessor> GrDSLFPTest_HelloWorld::onMakeProgramImpl() const {
|
|
|
|
return std::make_unique<GrGLSLDSLFPTest_HelloWorld>();
|
|
|
|
}
|
|
|
|
void GrDSLFPTest_HelloWorld::onGetGLSLProcessorKey(const GrShaderCaps& caps, GrProcessorKeyBuilder* b) const {
|
|
|
|
}
|
|
|
|
bool GrDSLFPTest_HelloWorld::onIsEqual(const GrFragmentProcessor& other) const {
|
|
|
|
const GrDSLFPTest_HelloWorld& that = other.cast<GrDSLFPTest_HelloWorld>();
|
|
|
|
(void) that;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
GrDSLFPTest_HelloWorld::GrDSLFPTest_HelloWorld(const GrDSLFPTest_HelloWorld& src)
|
|
|
|
: INHERITED(kGrDSLFPTest_HelloWorld_ClassID, src.optimizationFlags()) {
|
|
|
|
this->cloneAndRegisterAllChildProcessors(src);
|
|
|
|
}
|
|
|
|
std::unique_ptr<GrFragmentProcessor> GrDSLFPTest_HelloWorld::clone() const {
|
|
|
|
return std::make_unique<GrDSLFPTest_HelloWorld>(*this);
|
|
|
|
}
|
|
|
|
#if GR_TEST_UTILS
|
|
|
|
SkString GrDSLFPTest_HelloWorld::onDumpInfo() const {
|
|
|
|
return SkString();
|
|
|
|
}
|
|
|
|
#endif
|