82ab3409f7
The long term goal is for the DSLCPPCodeGenerator to replace the CPPCodeGenerator entirely, but we will need both to coexist while DSL is still under development. Currently, the DSLCPPCodeGenerator is cloned from CPPCodeGenerator and emits almost exactly the same code (it adds a comment at the top to distinguish its output). Its output will change in followup CLs. This CL also allows skslc to recognize the `_dsl.cpp` output suffix and generate code using DSLCPPCodeGenerator instead of CPPCodeGenerator. This allows test DSL FPs to be created for inspection. Change-Id: If5136279c307ea53a9df3a292caa18344c1eb259 Bug: skia:11854 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/396096 Commit-Queue: John Stiles <johnstiles@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
37 lines
1.3 KiB
C++
37 lines
1.3 KiB
C++
/* HELLO WORLD */
|
|
|
|
/**************************************************************************************************
|
|
*** This file was autogenerated from GrDSLHelloWorld.fp; do not modify.
|
|
**************************************************************************************************/
|
|
#ifndef GrDSLHelloWorld_DEFINED
|
|
#define GrDSLHelloWorld_DEFINED
|
|
|
|
#include "include/core/SkM44.h"
|
|
#include "include/core/SkTypes.h"
|
|
|
|
|
|
#include "src/gpu/GrFragmentProcessor.h"
|
|
|
|
class GrDSLHelloWorld : public GrFragmentProcessor {
|
|
public:
|
|
static std::unique_ptr<GrFragmentProcessor> Make() {
|
|
return std::unique_ptr<GrFragmentProcessor>(new GrDSLHelloWorld());
|
|
}
|
|
GrDSLHelloWorld(const GrDSLHelloWorld& src);
|
|
std::unique_ptr<GrFragmentProcessor> clone() const override;
|
|
const char* name() const override { return "DSLHelloWorld"; }
|
|
private:
|
|
GrDSLHelloWorld()
|
|
: INHERITED(kGrDSLHelloWorld_ClassID, kNone_OptimizationFlags) {
|
|
}
|
|
std::unique_ptr<GrGLSLFragmentProcessor> onMakeProgramImpl() const override;
|
|
void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override;
|
|
bool onIsEqual(const GrFragmentProcessor&) const override;
|
|
#if GR_TEST_UTILS
|
|
SkString onDumpInfo() const override;
|
|
#endif
|
|
GR_DECLARE_FRAGMENT_PROCESSOR_TEST
|
|
using INHERITED = GrFragmentProcessor;
|
|
};
|
|
#endif
|