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 SkPerlinNoiseShader_DEFINED | 8 #ifndef SkPerlinNoiseShader_DEFINED |
9 #define SkPerlinNoiseShader_DEFINED | 9 #define SkPerlinNoiseShader_DEFINED |
10 | 10 |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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*, GrColor*, |
100 GrFragmentProcessor**) const SK_OVERRIDE; | 100 GrFragmentProcessor**) const SK_OVERRIDE; |
101 | 101 |
102 SK_TO_STRING_OVERRIDE() | 102 SK_TO_STRING_OVERRIDE() |
103 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkPerlinNoiseShader) | 103 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkPerlinNoiseShader) |
104 | 104 |
105 protected: | 105 protected: |
106 #ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING | |
107 SkPerlinNoiseShader(SkReadBuffer&); | |
108 #endif | |
109 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; | 106 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; |
110 virtual Context* onCreateContext(const ContextRec&, void* storage) const SK_
OVERRIDE; | 107 virtual Context* onCreateContext(const ContextRec&, void* storage) const SK_
OVERRIDE; |
111 | 108 |
112 private: | 109 private: |
113 SkPerlinNoiseShader(SkPerlinNoiseShader::Type type, SkScalar baseFrequencyX, | 110 SkPerlinNoiseShader(SkPerlinNoiseShader::Type type, SkScalar baseFrequencyX, |
114 SkScalar baseFrequencyY, int numOctaves, SkScalar seed, | 111 SkScalar baseFrequencyY, int numOctaves, SkScalar seed, |
115 const SkISize* tileSize); | 112 const SkISize* tileSize); |
116 virtual ~SkPerlinNoiseShader(); | 113 virtual ~SkPerlinNoiseShader(); |
117 | 114 |
118 // TODO (scroggo): Once all SkShaders are created from a factory, and we hav
e removed the | 115 const SkPerlinNoiseShader::Type fType; |
119 // constructor that creates SkPerlinNoiseShader from an SkReadBuffer, severa
l fields can | 116 const SkScalar fBaseFrequencyX; |
120 // be made constant. | 117 const SkScalar fBaseFrequencyY; |
121 /*const*/ SkPerlinNoiseShader::Type fType; | 118 const int fNumOctaves; |
122 /*const*/ SkScalar fBaseFrequencyX; | 119 const SkScalar fSeed; |
123 /*const*/ SkScalar fBaseFrequencyY; | 120 const SkISize fTileSize; |
124 /*const*/ int fNumOctaves; | 121 const bool fStitchTiles; |
125 /*const*/ SkScalar fSeed; | |
126 /*const*/ SkISize fTileSize; | |
127 /*const*/ bool fStitchTiles; | |
128 | 122 |
129 typedef SkShader INHERITED; | 123 typedef SkShader INHERITED; |
130 }; | 124 }; |
131 | 125 |
132 #endif | 126 #endif |
OLD | NEW |