| 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 #include "SkDither.h" | 8 #include "SkDither.h" |
| 9 #include "SkPerlinNoiseShader.h" | 9 #include "SkPerlinNoiseShader.h" |
| 10 #include "SkColorFilter.h" | 10 #include "SkColorFilter.h" |
| (...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 573 typedef GrGLPerlinNoise GLProcessor; | 573 typedef GrGLPerlinNoise GLProcessor; |
| 574 | 574 |
| 575 private: | 575 private: |
| 576 virtual bool onIsEqual(const GrFragmentProcessor& sBase) const SK_OVERRIDE { | 576 virtual bool onIsEqual(const GrFragmentProcessor& sBase) const SK_OVERRIDE { |
| 577 const GrPerlinNoiseEffect& s = sBase.cast<GrPerlinNoiseEffect>(); | 577 const GrPerlinNoiseEffect& s = sBase.cast<GrPerlinNoiseEffect>(); |
| 578 return fType == s.fType && | 578 return fType == s.fType && |
| 579 fPaintingData->fBaseFrequency == s.fPaintingData->fBaseFrequency
&& | 579 fPaintingData->fBaseFrequency == s.fPaintingData->fBaseFrequency
&& |
| 580 fNumOctaves == s.fNumOctaves && | 580 fNumOctaves == s.fNumOctaves && |
| 581 fStitchTiles == s.fStitchTiles && | 581 fStitchTiles == s.fStitchTiles && |
| 582 fAlpha == s.fAlpha && | 582 fAlpha == s.fAlpha && |
| 583 fPermutationsAccess.getTexture() == s.fPermutationsAccess.getText
ure() && | |
| 584 fNoiseAccess.getTexture() == s.fNoiseAccess.getTexture() && | |
| 585 fPaintingData->fStitchDataInit == s.fPaintingData->fStitchDataIni
t; | 583 fPaintingData->fStitchDataInit == s.fPaintingData->fStitchDataIni
t; |
| 586 } | 584 } |
| 587 | 585 |
| 588 void onComputeInvariantOutput(InvariantOutput* inout) const SK_OVERRIDE { | 586 void onComputeInvariantOutput(InvariantOutput* inout) const SK_OVERRIDE { |
| 589 inout->setToUnknown(); | 587 inout->setToUnknown(); |
| 590 } | 588 } |
| 591 | 589 |
| 592 GrPerlinNoiseEffect(SkPerlinNoiseShader::Type type, | 590 GrPerlinNoiseEffect(SkPerlinNoiseShader::Type type, |
| 593 int numOctaves, bool stitchTiles, | 591 int numOctaves, bool stitchTiles, |
| 594 SkPerlinNoiseShader::PaintingData* paintingData, | 592 SkPerlinNoiseShader::PaintingData* paintingData, |
| (...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1052 str->append(" seed: "); | 1050 str->append(" seed: "); |
| 1053 str->appendScalar(fSeed); | 1051 str->appendScalar(fSeed); |
| 1054 str->append(" stitch tiles: "); | 1052 str->append(" stitch tiles: "); |
| 1055 str->append(fStitchTiles ? "true " : "false "); | 1053 str->append(fStitchTiles ? "true " : "false "); |
| 1056 | 1054 |
| 1057 this->INHERITED::toString(str); | 1055 this->INHERITED::toString(str); |
| 1058 | 1056 |
| 1059 str->append(")"); | 1057 str->append(")"); |
| 1060 } | 1058 } |
| 1061 #endif | 1059 #endif |
| OLD | NEW |