| 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 const StitchData& stitchData, const SkPoint& noiseVecto
r) const; | 96 const StitchData& stitchData, const SkPoint& noiseVecto
r) const; |
| 97 | 97 |
| 98 SkMatrix fMatrix; | 98 SkMatrix fMatrix; |
| 99 PaintingData* fPaintingData; | 99 PaintingData* fPaintingData; |
| 100 | 100 |
| 101 typedef SkShader::Context INHERITED; | 101 typedef SkShader::Context INHERITED; |
| 102 }; | 102 }; |
| 103 | 103 |
| 104 #if SK_SUPPORT_GPU | 104 #if SK_SUPPORT_GPU |
| 105 const GrFragmentProcessor* asFragmentProcessor(GrContext* context, const SkM
atrix& viewM, | 105 const GrFragmentProcessor* asFragmentProcessor(GrContext* context, const SkM
atrix& viewM, |
| 106 const SkMatrix*, SkFilterQual
ity) const override; | 106 const SkMatrix*, SkFilterQual
ity, |
| 107 SkSourceGammaTreatment) const
override; |
| 107 #endif | 108 #endif |
| 108 | 109 |
| 109 SK_TO_STRING_OVERRIDE() | 110 SK_TO_STRING_OVERRIDE() |
| 110 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkPerlinNoiseShader) | 111 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkPerlinNoiseShader) |
| 111 | 112 |
| 112 protected: | 113 protected: |
| 113 void flatten(SkWriteBuffer&) const override; | 114 void flatten(SkWriteBuffer&) const override; |
| 114 Context* onCreateContext(const ContextRec&, void* storage) const override; | 115 Context* onCreateContext(const ContextRec&, void* storage) const override; |
| 115 size_t onContextSize(const ContextRec&) const override; | 116 size_t onContextSize(const ContextRec&) const override; |
| 116 | 117 |
| 117 private: | 118 private: |
| 118 SkPerlinNoiseShader(SkPerlinNoiseShader::Type type, SkScalar baseFrequencyX, | 119 SkPerlinNoiseShader(SkPerlinNoiseShader::Type type, SkScalar baseFrequencyX, |
| 119 SkScalar baseFrequencyY, int numOctaves, SkScalar seed, | 120 SkScalar baseFrequencyY, int numOctaves, SkScalar seed, |
| 120 const SkISize* tileSize); | 121 const SkISize* tileSize); |
| 121 virtual ~SkPerlinNoiseShader(); | 122 virtual ~SkPerlinNoiseShader(); |
| 122 | 123 |
| 123 const SkPerlinNoiseShader::Type fType; | 124 const SkPerlinNoiseShader::Type fType; |
| 124 const SkScalar fBaseFrequencyX; | 125 const SkScalar fBaseFrequencyX; |
| 125 const SkScalar fBaseFrequencyY; | 126 const SkScalar fBaseFrequencyY; |
| 126 const int fNumOctaves; | 127 const int fNumOctaves; |
| 127 const SkScalar fSeed; | 128 const SkScalar fSeed; |
| 128 const SkISize fTileSize; | 129 const SkISize fTileSize; |
| 129 const bool fStitchTiles; | 130 const bool fStitchTiles; |
| 130 | 131 |
| 131 typedef SkShader INHERITED; | 132 typedef SkShader INHERITED; |
| 132 }; | 133 }; |
| 133 | 134 |
| 134 #endif | 135 #endif |
| OLD | NEW |