OLD | NEW |
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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 const GrFragmentProcessor* asFragmentProcessor(GrContext* context, const SkM
atrix& viewM, | 109 const GrFragmentProcessor* asFragmentProcessor(GrContext* context, const SkM
atrix& viewM, |
110 const SkMatrix*, SkFilterQual
ity) const override; | 110 const SkMatrix*, SkFilterQual
ity, |
| 111 SkSourceGammaTreatment) const
override; |
111 #endif | 112 #endif |
112 | 113 |
113 SK_TO_STRING_OVERRIDE() | 114 SK_TO_STRING_OVERRIDE() |
114 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkPerlinNoiseShader2) | 115 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkPerlinNoiseShader2) |
115 | 116 |
116 protected: | 117 protected: |
117 void flatten(SkWriteBuffer&) const override; | 118 void flatten(SkWriteBuffer&) const override; |
118 size_t onContextSize(const ContextRec&) const override; | 119 size_t onContextSize(const ContextRec&) const override; |
119 Context* onCreateContext(const ContextRec&, void* storage) const override; | 120 Context* onCreateContext(const ContextRec&, void* storage) const override; |
120 | 121 |
121 private: | 122 private: |
122 SkPerlinNoiseShader2(SkPerlinNoiseShader2::Type type, SkScalar baseFrequency
X, | 123 SkPerlinNoiseShader2(SkPerlinNoiseShader2::Type type, SkScalar baseFrequency
X, |
123 SkScalar baseFrequencyY, int numOctaves, SkScalar seed, | 124 SkScalar baseFrequencyY, int numOctaves, SkScalar seed, |
124 const SkISize* tileSize); | 125 const SkISize* tileSize); |
125 virtual ~SkPerlinNoiseShader2(); | 126 virtual ~SkPerlinNoiseShader2(); |
126 | 127 |
127 const SkPerlinNoiseShader2::Type fType; | 128 const SkPerlinNoiseShader2::Type fType; |
128 const SkScalar fBaseFrequencyX; | 129 const SkScalar fBaseFrequencyX; |
129 const SkScalar fBaseFrequencyY; | 130 const SkScalar fBaseFrequencyY; |
130 const int fNumOctaves; | 131 const int fNumOctaves; |
131 const SkScalar fSeed; | 132 const SkScalar fSeed; |
132 const SkISize fTileSize; | 133 const SkISize fTileSize; |
133 const bool fStitchTiles; | 134 const bool fStitchTiles; |
134 | 135 |
135 typedef SkShader INHERITED; | 136 typedef SkShader INHERITED; |
136 }; | 137 }; |
137 | 138 |
138 #endif | 139 #endif |
OLD | NEW |