Index: include/effects/SkPerlinNoiseShader.h |
diff --git a/include/effects/SkPerlinNoiseShader.h b/include/effects/SkPerlinNoiseShader.h |
index d9b0277f92609c5616e399c0d8ba734a5a1b6575..d652e5dcad2e57e9b2a09035990f1a7c11d68265 100644 |
--- a/include/effects/SkPerlinNoiseShader.h |
+++ b/include/effects/SkPerlinNoiseShader.h |
@@ -55,21 +55,30 @@ public: |
* the frequencies so that the noise will be tileable for the given tile size. If tileSize |
* is NULL or an empty size, the frequencies will be used as is without modification. |
*/ |
+ static sk_sp<SkShader> MakeFractalNoise(SkScalar baseFrequencyX, SkScalar baseFrequencyY, |
+ int numOctaves, SkScalar seed, |
+ const SkISize* tileSize = nullptr); |
+ static sk_sp<SkShader> MakeTurbulence(SkScalar baseFrequencyX, SkScalar baseFrequencyY, |
+ int numOctaves, SkScalar seed, |
+ const SkISize* tileSize = nullptr); |
+ |
+#ifdef SK_SUPPORT_LEGACY_CREATESHADER_PTR |
static SkShader* CreateFractalNoise(SkScalar baseFrequencyX, SkScalar baseFrequencyY, |
int numOctaves, SkScalar seed, |
- const SkISize* tileSize = NULL); |
+ const SkISize* tileSize = NULL) { |
+ return MakeFractalNoise(baseFrequencyX, baseFrequencyY, numOctaves, seed, tileSize).release(); |
+ } |
static SkShader* CreateTurbulence(SkScalar baseFrequencyX, SkScalar baseFrequencyY, |
- int numOctaves, SkScalar seed, |
- const SkISize* tileSize = NULL); |
- /** |
- * Create alias for CreateTurbulunce until all Skia users changed |
- * its code to use the new naming |
- */ |
+ int numOctaves, SkScalar seed, |
+ const SkISize* tileSize = NULL) { |
+ return MakeTurbulence(baseFrequencyX, baseFrequencyY, numOctaves, seed, tileSize).release(); |
+ } |
static SkShader* CreateTubulence(SkScalar baseFrequencyX, SkScalar baseFrequencyY, |
int numOctaves, SkScalar seed, |
const SkISize* tileSize = NULL) { |
return CreateTurbulence(baseFrequencyX, baseFrequencyY, numOctaves, seed, tileSize); |
} |
+#endif |
class PerlinNoiseShaderContext : public SkShader::Context { |
public: |