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

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

Issue 808703006: remove view matrix from context (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: one more fix Created 6 years 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/GrContext.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*, GrColor*, 99 virtual bool asFragmentProcessor(GrContext* context, const SkPaint&, const S kMatrix& viewM,
100 const SkMatrix*, GrColor*,
100 GrFragmentProcessor**) const SK_OVERRIDE; 101 GrFragmentProcessor**) const SK_OVERRIDE;
101 102
102 SK_TO_STRING_OVERRIDE() 103 SK_TO_STRING_OVERRIDE()
103 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkPerlinNoiseShader) 104 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkPerlinNoiseShader)
104 105
105 protected: 106 protected:
106 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; 107 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE;
107 virtual Context* onCreateContext(const ContextRec&, void* storage) const SK_ OVERRIDE; 108 virtual Context* onCreateContext(const ContextRec&, void* storage) const SK_ OVERRIDE;
108 109
109 private: 110 private:
110 SkPerlinNoiseShader(SkPerlinNoiseShader::Type type, SkScalar baseFrequencyX, 111 SkPerlinNoiseShader(SkPerlinNoiseShader::Type type, SkScalar baseFrequencyX,
111 SkScalar baseFrequencyY, int numOctaves, SkScalar seed, 112 SkScalar baseFrequencyY, int numOctaves, SkScalar seed,
112 const SkISize* tileSize); 113 const SkISize* tileSize);
113 virtual ~SkPerlinNoiseShader(); 114 virtual ~SkPerlinNoiseShader();
114 115
115 const SkPerlinNoiseShader::Type fType; 116 const SkPerlinNoiseShader::Type fType;
116 const SkScalar fBaseFrequencyX; 117 const SkScalar fBaseFrequencyX;
117 const SkScalar fBaseFrequencyY; 118 const SkScalar fBaseFrequencyY;
118 const int fNumOctaves; 119 const int fNumOctaves;
119 const SkScalar fSeed; 120 const SkScalar fSeed;
120 const SkISize fTileSize; 121 const SkISize fTileSize;
121 const bool fStitchTiles; 122 const bool fStitchTiles;
122 123
123 typedef SkShader INHERITED; 124 typedef SkShader INHERITED;
124 }; 125 };
125 126
126 #endif 127 #endif
OLDNEW
« no previous file with comments | « include/core/SkShader.h ('k') | include/gpu/GrContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698