OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #ifndef SkPerlinNoiseShader2_DEFINED | 8 #ifndef SkPerlinNoiseShader2_DEFINED |
9 #define SkPerlinNoiseShader2_DEFINED | 9 #define SkPerlinNoiseShader2_DEFINED |
10 | 10 |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 * Create alias for CreateTurbulunce until all Skia users changed | 77 * Create alias for CreateTurbulunce until all Skia users changed |
78 * its code to use the new naming | 78 * its code to use the new naming |
79 */ | 79 */ |
80 static SkShader* CreateTubulence(SkScalar baseFrequencyX, SkScalar baseFrequ
encyY, | 80 static SkShader* CreateTubulence(SkScalar baseFrequencyX, SkScalar baseFrequ
encyY, |
81 int numOctaves, SkScalar seed, | 81 int numOctaves, SkScalar seed, |
82 const SkISize* tileSize = NULL) { | 82 const SkISize* tileSize = NULL) { |
83 return CreateTurbulence(baseFrequencyX, baseFrequencyY, numOctaves, seed, ti
leSize); | 83 return CreateTurbulence(baseFrequencyX, baseFrequencyY, numOctaves, seed, ti
leSize); |
84 } | 84 } |
85 | 85 |
86 | 86 |
87 size_t contextSize() const override; | 87 size_t contextSize(const ContextRec&) const override; |
88 | 88 |
89 class PerlinNoiseShaderContext : public SkShader::Context { | 89 class PerlinNoiseShaderContext : public SkShader::Context { |
90 public: | 90 public: |
91 PerlinNoiseShaderContext(const SkPerlinNoiseShader2& shader, const Conte
xtRec&); | 91 PerlinNoiseShaderContext(const SkPerlinNoiseShader2& shader, const Conte
xtRec&); |
92 virtual ~PerlinNoiseShaderContext(); | 92 virtual ~PerlinNoiseShaderContext(); |
93 | 93 |
94 void shadeSpan(int x, int y, SkPMColor[], int count) override; | 94 void shadeSpan(int x, int y, SkPMColor[], int count) override; |
95 | 95 |
96 private: | 96 private: |
97 SkPMColor shade(const SkPoint& point, StitchData& stitchData) const; | 97 SkPMColor shade(const SkPoint& point, StitchData& stitchData) const; |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 const SkScalar fBaseFrequencyY; | 131 const SkScalar fBaseFrequencyY; |
132 const int fNumOctaves; | 132 const int fNumOctaves; |
133 const SkScalar fSeed; | 133 const SkScalar fSeed; |
134 const SkISize fTileSize; | 134 const SkISize fTileSize; |
135 const bool fStitchTiles; | 135 const bool fStitchTiles; |
136 | 136 |
137 typedef SkShader INHERITED; | 137 typedef SkShader INHERITED; |
138 }; | 138 }; |
139 | 139 |
140 #endif | 140 #endif |
OLD | NEW |