Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(38)

Unified Diff: experimental/SkPerlinNoiseShader2/SkPerlinNoiseShader2.h

Issue 1772463002: use Make instead of Create to return a shared shader (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | experimental/SkPerlinNoiseShader2/SkPerlinNoiseShader2.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: experimental/SkPerlinNoiseShader2/SkPerlinNoiseShader2.h
diff --git a/experimental/SkPerlinNoiseShader2/SkPerlinNoiseShader2.h b/experimental/SkPerlinNoiseShader2/SkPerlinNoiseShader2.h
index fac098ab52194c9b72feee0908d4244080efc0f8..8a5158367377b5505285b2af45c48c39958437d2 100644
--- a/experimental/SkPerlinNoiseShader2/SkPerlinNoiseShader2.h
+++ b/experimental/SkPerlinNoiseShader2/SkPerlinNoiseShader2.h
@@ -61,26 +61,26 @@ 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 SkShader* CreateFractalNoise(SkScalar baseFrequencyX, SkScalar baseFrequencyY,
- int numOctaves, SkScalar seed,
- const SkISize* tileSize = NULL);
- static SkShader* CreateTurbulence(SkScalar baseFrequencyX, SkScalar baseFrequencyY,
- int numOctaves, SkScalar seed,
- const SkISize* tileSize = NULL);
+ static sk_sp<SkShader> MakeFractalNoise(SkScalar baseFrequencyX, SkScalar baseFrequencyY,
+ int numOctaves, SkScalar seed,
+ const SkISize* tileSize = NULL);
+ static sk_sp<SkShader> MakeTurbulence(SkScalar baseFrequencyX, SkScalar baseFrequencyY,
+ int numOctaves, SkScalar seed,
+ const SkISize* tileSize = NULL);
/**
* Creates an Improved Perlin Noise shader. The z value is roughly equivalent to the seed of the
* other two types, but minor variations to z will only slightly change the noise.
*/
- static SkShader* CreateImprovedNoise(SkScalar baseFrequencyX, SkScalar baseFrequencyY,
- int numOctaves, SkScalar z);
+ static sk_sp<SkShader> MakeImprovedNoise(SkScalar baseFrequencyX, SkScalar baseFrequencyY,
+ int numOctaves, SkScalar z);
/**
* Create alias for CreateTurbulunce until all Skia users changed
* its code to use the new naming
*/
- static SkShader* CreateTubulence(SkScalar baseFrequencyX, SkScalar baseFrequencyY,
- int numOctaves, SkScalar seed,
- const SkISize* tileSize = NULL) {
- return CreateTurbulence(baseFrequencyX, baseFrequencyY, numOctaves, seed, tileSize);
+ static sk_sp<SkShader> MakeTubulence(SkScalar baseFrequencyX, SkScalar baseFrequencyY,
+ int numOctaves, SkScalar seed,
+ const SkISize* tileSize = NULL) {
+ return MakeTurbulence(baseFrequencyX, baseFrequencyY, numOctaves, seed, tileSize);
}
class PerlinNoiseShaderContext : public SkShader::Context {
« no previous file with comments | « no previous file | experimental/SkPerlinNoiseShader2/SkPerlinNoiseShader2.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698