| 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 #if SK_SUPPORT_GPU | 99 #if SK_SUPPORT_GPU |
| 100 const GrFragmentProcessor* asFragmentProcessor(GrContext* context, const SkM
atrix& viewM, | 100 const GrFragmentProcessor* asFragmentProcessor(GrContext* context, const SkM
atrix& viewM, |
| 101 const SkMatrix*, SkFilterQual
ity, | 101 const SkMatrix*, SkFilterQual
ity) const override; |
| 102 GrProcessorDataManager*) cons
t override; | |
| 103 #endif | 102 #endif |
| 104 | 103 |
| 105 SK_TO_STRING_OVERRIDE() | 104 SK_TO_STRING_OVERRIDE() |
| 106 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkPerlinNoiseShader) | 105 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkPerlinNoiseShader) |
| 107 | 106 |
| 108 protected: | 107 protected: |
| 109 void flatten(SkWriteBuffer&) const override; | 108 void flatten(SkWriteBuffer&) const override; |
| 110 Context* onCreateContext(const ContextRec&, void* storage) const override; | 109 Context* onCreateContext(const ContextRec&, void* storage) const override; |
| 111 | 110 |
| 112 private: | 111 private: |
| 113 SkPerlinNoiseShader(SkPerlinNoiseShader::Type type, SkScalar baseFrequencyX, | 112 SkPerlinNoiseShader(SkPerlinNoiseShader::Type type, SkScalar baseFrequencyX, |
| 114 SkScalar baseFrequencyY, int numOctaves, SkScalar seed, | 113 SkScalar baseFrequencyY, int numOctaves, SkScalar seed, |
| 115 const SkISize* tileSize); | 114 const SkISize* tileSize); |
| 116 virtual ~SkPerlinNoiseShader(); | 115 virtual ~SkPerlinNoiseShader(); |
| 117 | 116 |
| 118 const SkPerlinNoiseShader::Type fType; | 117 const SkPerlinNoiseShader::Type fType; |
| 119 const SkScalar fBaseFrequencyX; | 118 const SkScalar fBaseFrequencyX; |
| 120 const SkScalar fBaseFrequencyY; | 119 const SkScalar fBaseFrequencyY; |
| 121 const int fNumOctaves; | 120 const int fNumOctaves; |
| 122 const SkScalar fSeed; | 121 const SkScalar fSeed; |
| 123 const SkISize fTileSize; | 122 const SkISize fTileSize; |
| 124 const bool fStitchTiles; | 123 const bool fStitchTiles; |
| 125 | 124 |
| 126 typedef SkShader INHERITED; | 125 typedef SkShader INHERITED; |
| 127 }; | 126 }; |
| 128 | 127 |
| 129 #endif | 128 #endif |
| OLD | NEW |