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

Side by Side Diff: include/effects/SkPerlinNoiseShader.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
« no previous file with comments | « include/core/SkShader.h ('k') | src/core/SkBitmapProcShader.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 SkPerlinNoiseShader_DEFINED 8 #ifndef SkPerlinNoiseShader_DEFINED
9 #define SkPerlinNoiseShader_DEFINED 9 #define SkPerlinNoiseShader_DEFINED
10 10
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 * Create alias for CreateTurbulunce until all Skia users changed 65 * Create alias for CreateTurbulunce until all Skia users changed
66 * its code to use the new naming 66 * its code to use the new naming
67 */ 67 */
68 static SkShader* CreateTubulence(SkScalar baseFrequencyX, SkScalar baseFrequ encyY, 68 static SkShader* CreateTubulence(SkScalar baseFrequencyX, SkScalar baseFrequ encyY,
69 int numOctaves, SkScalar seed, 69 int numOctaves, SkScalar seed,
70 const SkISize* tileSize = NULL) { 70 const SkISize* tileSize = NULL) {
71 return CreateTurbulence(baseFrequencyX, baseFrequencyY, numOctaves, seed, ti leSize); 71 return CreateTurbulence(baseFrequencyX, baseFrequencyY, numOctaves, seed, ti leSize);
72 } 72 }
73 73
74 74
75 size_t contextSize() const override; 75 size_t contextSize(const ContextRec&) const override;
76 76
77 class PerlinNoiseShaderContext : public SkShader::Context { 77 class PerlinNoiseShaderContext : public SkShader::Context {
78 public: 78 public:
79 PerlinNoiseShaderContext(const SkPerlinNoiseShader& shader, const Contex tRec&); 79 PerlinNoiseShaderContext(const SkPerlinNoiseShader& shader, const Contex tRec&);
80 virtual ~PerlinNoiseShaderContext(); 80 virtual ~PerlinNoiseShaderContext();
81 81
82 void shadeSpan(int x, int y, SkPMColor[], int count) override; 82 void shadeSpan(int x, int y, SkPMColor[], int count) override;
83 83
84 private: 84 private:
85 SkPMColor shade(const SkPoint& point, StitchData& stitchData) const; 85 SkPMColor shade(const SkPoint& point, StitchData& stitchData) const;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 const SkScalar fBaseFrequencyY; 118 const SkScalar fBaseFrequencyY;
119 const int fNumOctaves; 119 const int fNumOctaves;
120 const SkScalar fSeed; 120 const SkScalar fSeed;
121 const SkISize fTileSize; 121 const SkISize fTileSize;
122 const bool fStitchTiles; 122 const bool fStitchTiles;
123 123
124 typedef SkShader INHERITED; 124 typedef SkShader INHERITED;
125 }; 125 };
126 126
127 #endif 127 #endif
OLDNEW
« no previous file with comments | « include/core/SkShader.h ('k') | src/core/SkBitmapProcShader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698