8#ifndef GrPerlinNoise2Effect_DEFINED
9#define GrPerlinNoise2Effect_DEFINED
37 static std::unique_ptr<GrFragmentProcessor>
Make(
41 std::unique_ptr<SkPerlinNoiseShader::PaintingData> paintingData,
56 return std::unique_ptr<GrFragmentProcessor>(
60 std::move(paintingData),
61 std::move(permutationsFP),
65 const char*
name()
const override {
return "PerlinNoise"; }
67 std::unique_ptr<GrFragmentProcessor>
clone()
const override {
72 return fPaintingData->fStitchDataInit;
84 void emitCode(EmitArgs&)
override;
89 GrGLSLProgramDataManager::UniformHandle fStitchDataUni;
90 GrGLSLProgramDataManager::UniformHandle fBaseFrequencyUni;
93 std::unique_ptr<ProgramImpl> onMakeProgramImpl()
const override {
94 return std::make_unique<Impl>();
101 return fType ==
s.fType &&
102 fPaintingData->fBaseFrequency ==
s.fPaintingData->fBaseFrequency &&
103 fNumOctaves ==
s.fNumOctaves && fStitchTiles ==
s.fStitchTiles &&
104 fPaintingData->fStitchDataInit ==
s.fPaintingData->fStitchDataInit;
110 std::unique_ptr<SkPerlinNoiseShader::PaintingData> paintingData,
111 std::unique_ptr<GrFragmentProcessor> permutationsFP,
112 std::unique_ptr<GrFragmentProcessor> noiseFP)
117 , fPaintingData(
std::move(paintingData)) {
126 , fNumOctaves(that.fNumOctaves)
127 , fStitchTiles(that.fStitchTiles)
136 std::unique_ptr<SkPerlinNoiseShader::PaintingData> fPaintingData;
#define GR_DECLARE_FRAGMENT_PROCESSOR_TEST
@ kPremul_SkAlphaType
pixel components are premultiplied by alpha
void registerChild(std::unique_ptr< GrFragmentProcessor > child, SkSL::SampleUsage sampleUsage=SkSL::SampleUsage::PassThrough())
void setUsesSampleCoordsDirectly()
@ kNone_OptimizationFlags
const char * name() const override
const SkVector & baseFrequency() const
static std::unique_ptr< GrFragmentProcessor > Make(SkPerlinNoiseShaderType type, int numOctaves, bool stitchTiles, std::unique_ptr< SkPerlinNoiseShader::PaintingData > paintingData, GrSurfaceProxyView permutationsView, GrSurfaceProxyView noiseView, const GrCaps &caps)
std::unique_ptr< GrFragmentProcessor > clone() const override
const SkPerlinNoiseShader::StitchData & stitchData() const
SkPerlinNoiseShaderType type() const
@ kGrPerlinNoise2Effect_ClassID
static std::unique_ptr< GrFragmentProcessor > Make(GrSurfaceProxyView, SkAlphaType, const SkMatrix &=SkMatrix::I(), GrSamplerState::Filter=GrSamplerState::Filter::kNearest, GrSamplerState::MipmapMode mipmapMode=GrSamplerState::MipmapMode::kNone)
static const SkMatrix & I()
static SampleUsage Explicit()
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args