#include "src/shaders/SkPerlinNoiseShaderImpl.h"
#include "include/core/SkColor.h"
#include "include/core/SkColorSpace.h"
#include "include/core/SkRefCnt.h"
#include "include/core/SkShader.h"
#include "include/effects/SkPerlinNoiseShader.h"
#include "src/base/SkArenaAlloc.h"
#include "src/core/SkEffectPriv.h"
#include "src/core/SkRasterPipeline.h"
#include "src/core/SkRasterPipelineOpContexts.h"
#include "src/core/SkRasterPipelineOpList.h"
#include "src/core/SkReadBuffer.h"
#include "src/core/SkWriteBuffer.h"
#include "src/shaders/SkPerlinNoiseShaderType.h"
#include <optional>
SkPerlinNoiseShader::SkPerlinNoiseShader(SkPerlinNoiseShaderType type,
SkScalar baseFrequencyX,
SkScalar baseFrequencyY,
int numOctaves,
SkScalar seed,
const SkISize* tileSize)
: … { … }
sk_sp<SkFlattenable> SkPerlinNoiseShader::CreateProc(SkReadBuffer& buffer) { … }
void SkPerlinNoiseShader::flatten(SkWriteBuffer& buffer) const { … }
bool SkPerlinNoiseShader::appendStages(const SkStageRec& rec,
const SkShaders::MatrixRec& mRec) const { … }
static bool valid_input(
SkScalar baseX, SkScalar baseY, int numOctaves, const SkISize* tileSize, SkScalar seed) { … }
void SkRegisterPerlinNoiseShaderFlattenable() { … }
namespace SkShaders {
sk_sp<SkShader> MakeFractalNoise(SkScalar baseFrequencyX,
SkScalar baseFrequencyY,
int numOctaves,
SkScalar seed,
const SkISize* tileSize) { … }
sk_sp<SkShader> MakeTurbulence(SkScalar baseFrequencyX,
SkScalar baseFrequencyY,
int numOctaves,
SkScalar seed,
const SkISize* tileSize) { … }
}