bf3e9e9591
This is completely unused - GrMatrixEffect is the only thing that deals with matrix transforms on child sampling. Removing this makes everything simpler to reason about. Change-Id: I555a3fd937c064f2480b149a6d4d8e36f7ee69bc Reviewed-on: https://skia-review.googlesource.com/c/skia/+/402176 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Michael Ludwig <michaelludwig@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
60 lines
2.3 KiB
C++
60 lines
2.3 KiB
C++
|
|
|
|
/**************************************************************************************************
|
|
*** This file was autogenerated from GrDSLFPTest_Sample.fp; do not modify.
|
|
**************************************************************************************************/
|
|
/* TODO(skia:11854): DSLCPPCodeGenerator is currently a work in progress. */
|
|
#include "GrDSLFPTest_Sample.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_Sample : public GrGLSLFragmentProcessor {
|
|
public:
|
|
GrGLSLDSLFPTest_Sample() {}
|
|
void emitCode(EmitArgs& args) override {
|
|
[[maybe_unused]] const GrDSLFPTest_Sample& _outer = args.fFp.cast<GrDSLFPTest_Sample>();
|
|
|
|
using namespace SkSL::dsl;
|
|
StartFragmentProcessor(this, &args);
|
|
Var _coords(kConst_Modifier, DSLType(kFloat2_Type), "coords", Float2(0.5f));
|
|
Var _inColor(kConst_Modifier, DSLType(kHalf4_Type), "inColor", Half4(0.75f));
|
|
Declare(_coords);
|
|
Declare(_inColor);
|
|
Return(((SampleChild(0) * SampleChild(1, _coords)) * SampleChild(0, _inColor)) * SampleChild(1, _coords, _inColor));
|
|
EndFragmentProcessor();
|
|
}
|
|
private:
|
|
void onSetData(const GrGLSLProgramDataManager& pdman, const GrFragmentProcessor& _proc) override {
|
|
}
|
|
};
|
|
std::unique_ptr<GrGLSLFragmentProcessor> GrDSLFPTest_Sample::onMakeProgramImpl() const {
|
|
return std::make_unique<GrGLSLDSLFPTest_Sample>();
|
|
}
|
|
void GrDSLFPTest_Sample::onGetGLSLProcessorKey(const GrShaderCaps& caps, GrProcessorKeyBuilder* b) const {
|
|
}
|
|
bool GrDSLFPTest_Sample::onIsEqual(const GrFragmentProcessor& other) const {
|
|
const GrDSLFPTest_Sample& that = other.cast<GrDSLFPTest_Sample>();
|
|
(void) that;
|
|
return true;
|
|
}
|
|
GrDSLFPTest_Sample::GrDSLFPTest_Sample(const GrDSLFPTest_Sample& src)
|
|
: INHERITED(kGrDSLFPTest_Sample_ClassID, src.optimizationFlags()) {
|
|
this->cloneAndRegisterAllChildProcessors(src);
|
|
}
|
|
std::unique_ptr<GrFragmentProcessor> GrDSLFPTest_Sample::clone() const {
|
|
return std::make_unique<GrDSLFPTest_Sample>(*this);
|
|
}
|
|
#if GR_TEST_UTILS
|
|
SkString GrDSLFPTest_Sample::onDumpInfo() const {
|
|
return SkString();
|
|
}
|
|
#endif
|