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 569 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
580 fNumOctaves == s.fNumOctaves && | 580 fNumOctaves == s.fNumOctaves && |
581 fStitchTiles == s.fStitchTiles && | 581 fStitchTiles == s.fStitchTiles && |
582 fCoordTransform.getMatrix() == s.fCoordTransform.getMatrix() && | 582 fCoordTransform.getMatrix() == s.fCoordTransform.getMatrix() && |
583 fAlpha == s.fAlpha && | 583 fAlpha == s.fAlpha && |
584 fPermutationsAccess.getTexture() == s.fPermutationsAccess.getText
ure() && | 584 fPermutationsAccess.getTexture() == s.fPermutationsAccess.getText
ure() && |
585 fNoiseAccess.getTexture() == s.fNoiseAccess.getTexture() && | 585 fNoiseAccess.getTexture() == s.fNoiseAccess.getTexture() && |
586 fPaintingData->fStitchDataInit == s.fPaintingData->fStitchDataIni
t; | 586 fPaintingData->fStitchDataInit == s.fPaintingData->fStitchDataIni
t; |
587 } | 587 } |
588 | 588 |
589 void onComputeInvariantOutput(InvariantOutput* inout) const SK_OVERRIDE { | 589 void onComputeInvariantOutput(InvariantOutput* inout) const SK_OVERRIDE { |
590 inout->fValidFlags = 0; // This is noise. Nothing is constant. | 590 inout->setToUnknown(); |
591 inout->fIsSingleComponent = false; | |
592 } | 591 } |
593 | 592 |
594 GrPerlinNoiseEffect(SkPerlinNoiseShader::Type type, | 593 GrPerlinNoiseEffect(SkPerlinNoiseShader::Type type, |
595 int numOctaves, bool stitchTiles, | 594 int numOctaves, bool stitchTiles, |
596 SkPerlinNoiseShader::PaintingData* paintingData, | 595 SkPerlinNoiseShader::PaintingData* paintingData, |
597 GrTexture* permutationsTexture, GrTexture* noiseTexture, | 596 GrTexture* permutationsTexture, GrTexture* noiseTexture, |
598 const SkMatrix& matrix, uint8_t alpha) | 597 const SkMatrix& matrix, uint8_t alpha) |
599 : fType(type) | 598 : fType(type) |
600 , fNumOctaves(numOctaves) | 599 , fNumOctaves(numOctaves) |
601 , fStitchTiles(stitchTiles) | 600 , fStitchTiles(stitchTiles) |
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1054 str->append(" seed: "); | 1053 str->append(" seed: "); |
1055 str->appendScalar(fSeed); | 1054 str->appendScalar(fSeed); |
1056 str->append(" stitch tiles: "); | 1055 str->append(" stitch tiles: "); |
1057 str->append(fStitchTiles ? "true " : "false "); | 1056 str->append(fStitchTiles ? "true " : "false "); |
1058 | 1057 |
1059 this->INHERITED::toString(str); | 1058 this->INHERITED::toString(str); |
1060 | 1059 |
1061 str->append(")"); | 1060 str->append(")"); |
1062 } | 1061 } |
1063 #endif | 1062 #endif |
OLD | NEW |