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

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

Issue 2175563003: Bundle SkShader::asFragmentProcessor arguments in a struct (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix indentation to be less arbitrary Created 4 years, 5 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 | « no previous file | experimental/SkPerlinNoiseShader2/SkPerlinNoiseShader2.cpp » ('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 SkPerlinNoiseShader2_DEFINED 8 #ifndef SkPerlinNoiseShader2_DEFINED
9 #define SkPerlinNoiseShader2_DEFINED 9 #define SkPerlinNoiseShader2_DEFINED
10 10
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 SkScalar noise2D(int channel, 99 SkScalar noise2D(int channel,
100 const StitchData& stitchData, const SkPoint& noiseVecto r) const; 100 const StitchData& stitchData, const SkPoint& noiseVecto r) const;
101 101
102 SkMatrix fMatrix; 102 SkMatrix fMatrix;
103 PaintingData* fPaintingData; 103 PaintingData* fPaintingData;
104 104
105 typedef SkShader::Context INHERITED; 105 typedef SkShader::Context INHERITED;
106 }; 106 };
107 107
108 #if SK_SUPPORT_GPU 108 #if SK_SUPPORT_GPU
109 sk_sp<GrFragmentProcessor> asFragmentProcessor(GrContext* context, const SkM atrix& viewM, 109 sk_sp<GrFragmentProcessor> asFragmentProcessor(const AsFPArgs&) const overri de;
110 const SkMatrix*, SkFilterQual ity,
111 SkSourceGammaTreatment) const override;
112 #endif 110 #endif
113 111
114 SK_TO_STRING_OVERRIDE() 112 SK_TO_STRING_OVERRIDE()
115 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkPerlinNoiseShader2) 113 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkPerlinNoiseShader2)
116 114
117 protected: 115 protected:
118 void flatten(SkWriteBuffer&) const override; 116 void flatten(SkWriteBuffer&) const override;
119 size_t onContextSize(const ContextRec&) const override; 117 size_t onContextSize(const ContextRec&) const override;
120 Context* onCreateContext(const ContextRec&, void* storage) const override; 118 Context* onCreateContext(const ContextRec&, void* storage) const override;
121 119
122 private: 120 private:
123 SkPerlinNoiseShader2(SkPerlinNoiseShader2::Type type, SkScalar baseFrequency X, 121 SkPerlinNoiseShader2(SkPerlinNoiseShader2::Type type, SkScalar baseFrequency X,
124 SkScalar baseFrequencyY, int numOctaves, SkScalar seed, 122 SkScalar baseFrequencyY, int numOctaves, SkScalar seed,
125 const SkISize* tileSize); 123 const SkISize* tileSize);
126 virtual ~SkPerlinNoiseShader2(); 124 virtual ~SkPerlinNoiseShader2();
127 125
128 const SkPerlinNoiseShader2::Type fType; 126 const SkPerlinNoiseShader2::Type fType;
129 const SkScalar fBaseFrequencyX; 127 const SkScalar fBaseFrequencyX;
130 const SkScalar fBaseFrequencyY; 128 const SkScalar fBaseFrequencyY;
131 const int fNumOctaves; 129 const int fNumOctaves;
132 const SkScalar fSeed; 130 const SkScalar fSeed;
133 const SkISize fTileSize; 131 const SkISize fTileSize;
134 const bool fStitchTiles; 132 const bool fStitchTiles;
135 133
136 typedef SkShader INHERITED; 134 typedef SkShader INHERITED;
137 }; 135 };
138 136
139 #endif 137 #endif
OLDNEW
« 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