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

Side by Side Diff: experimental/SkPerlinNoiseShader2/SkPerlinNoiseShader2.h

Issue 1720933002: Add ContextRec param to SkShader::contextSize() (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: ContextRec plumbing only Created 4 years, 10 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 unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « bench/SkLinearBitmapPipelineBench.cpp ('k') | experimental/SkPerlinNoiseShader2/SkPerlinNoiseShader2.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698