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

Side by Side Diff: include/effects/SkPerlinNoiseShader.h

Issue 1316513002: Change SkShader;asFragmentProcessor signature to no longer take skpaint\grcolor* (Closed) Base URL: https://skia.googlesource.com/skia.git@things
Patch Set: Address comments, fix roll(?) Created 5 years, 3 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') | include/gpu/GrFragmentProcessor.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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 StitchData& stitchData, const SkPoint& point) const; 89 StitchData& stitchData, const SkPoint& point) const;
90 SkScalar noise2D(int channel, 90 SkScalar noise2D(int channel,
91 const StitchData& stitchData, const SkPoint& noiseVecto r) const; 91 const StitchData& stitchData, const SkPoint& noiseVecto r) const;
92 92
93 SkMatrix fMatrix; 93 SkMatrix fMatrix;
94 PaintingData* fPaintingData; 94 PaintingData* fPaintingData;
95 95
96 typedef SkShader::Context INHERITED; 96 typedef SkShader::Context INHERITED;
97 }; 97 };
98 98
99 virtual bool asFragmentProcessor(GrContext* context, const SkPaint&, const S kMatrix& viewM, 99 #if SK_SUPPORT_GPU
100 const SkMatrix*, GrColor*, GrProcessorDataM anager*, 100 const GrFragmentProcessor* asFragmentProcessor(GrContext* context, const SkM atrix& viewM,
101 GrFragmentProcessor**) const override; 101 const SkMatrix*, SkFilterQual ity,
102 GrProcessorDataManager*) cons t override;
103 #endif
102 104
103 SK_TO_STRING_OVERRIDE() 105 SK_TO_STRING_OVERRIDE()
104 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkPerlinNoiseShader) 106 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkPerlinNoiseShader)
105 107
106 protected: 108 protected:
107 void flatten(SkWriteBuffer&) const override; 109 void flatten(SkWriteBuffer&) const override;
108 Context* onCreateContext(const ContextRec&, void* storage) const override; 110 Context* onCreateContext(const ContextRec&, void* storage) const override;
109 111
110 private: 112 private:
111 SkPerlinNoiseShader(SkPerlinNoiseShader::Type type, SkScalar baseFrequencyX, 113 SkPerlinNoiseShader(SkPerlinNoiseShader::Type type, SkScalar baseFrequencyX,
112 SkScalar baseFrequencyY, int numOctaves, SkScalar seed, 114 SkScalar baseFrequencyY, int numOctaves, SkScalar seed,
113 const SkISize* tileSize); 115 const SkISize* tileSize);
114 virtual ~SkPerlinNoiseShader(); 116 virtual ~SkPerlinNoiseShader();
115 117
116 const SkPerlinNoiseShader::Type fType; 118 const SkPerlinNoiseShader::Type fType;
117 const SkScalar fBaseFrequencyX; 119 const SkScalar fBaseFrequencyX;
118 const SkScalar fBaseFrequencyY; 120 const SkScalar fBaseFrequencyY;
119 const int fNumOctaves; 121 const int fNumOctaves;
120 const SkScalar fSeed; 122 const SkScalar fSeed;
121 const SkISize fTileSize; 123 const SkISize fTileSize;
122 const bool fStitchTiles; 124 const bool fStitchTiles;
123 125
124 typedef SkShader INHERITED; 126 typedef SkShader INHERITED;
125 }; 127 };
126 128
127 #endif 129 #endif
OLDNEW
« no previous file with comments | « include/core/SkShader.h ('k') | include/gpu/GrFragmentProcessor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698