skia2/tests/sksl/dslfp/GrDSLFPTest_HelloWorld.dsl.cpp
John Stiles 119ad7329d Remove superfluous lines from DSL generated code.
The comma-warning issue has since been fixed, and we don't need to
use `(void) var;` when we have C++17's [[maybe_unused]] attribute.

Change-Id: I2078354f06801b024638e9c7d9ac699df20a8c48
Bug: skia:11854
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/401116
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-04-26 16:40:48 +00:00

56 lines
2.2 KiB
C++

/* 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 {
[[maybe_unused]] const GrDSLFPTest_HelloWorld& _outer = args.fFp.cast<GrDSLFPTest_HelloWorld>();
using namespace SkSL::dsl;
StartFragmentProcessor(this, &args);
Return(Half4(0.0f, 1.0f, 0.0f, 1.0f));
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