diff options
author | 2014-10-03 06:24:12 -0700 | |
---|---|---|
committer | 2014-10-03 06:24:12 -0700 | |
commit | 1a8ecdfb73a15de600d5779b75d7c4b61863c50b (patch) | |
tree | 60463286864f73929d9c2f1d730e44b7ddee3597 /src/effects/SkPerlinNoiseShader.cpp | |
parent | d751ac01a3a887bc2d71146fc7353a5f33730043 (diff) |
Add isSingleComponent bool to getConstantColorComponent
Initial step to allowing effects to use/output 1 or 4 color/coverage components. This cl doesn't change any current logic and all effects still assume they are working with 4 components.
BUG=skia:
Committed: https://skia.googlesource.com/skia/+/3b8af078281a5a20f951b9fd84f38d92b8f6217b
Review URL: https://codereview.chromium.org/608253002
Diffstat (limited to 'src/effects/SkPerlinNoiseShader.cpp')
-rw-r--r-- | src/effects/SkPerlinNoiseShader.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/effects/SkPerlinNoiseShader.cpp b/src/effects/SkPerlinNoiseShader.cpp index 88e6caddb9..43197dedf2 100644 --- a/src/effects/SkPerlinNoiseShader.cpp +++ b/src/effects/SkPerlinNoiseShader.cpp @@ -586,6 +586,11 @@ private: fPaintingData->fStitchDataInit == s.fPaintingData->fStitchDataInit; } + void onComputeInvariantOutput(InvariantOutput* inout) const SK_OVERRIDE { + inout->fValidFlags = 0; // This is noise. Nothing is constant. + inout->fIsSingleComponent = false; + } + GrPerlinNoiseEffect(SkPerlinNoiseShader::Type type, int numOctaves, bool stitchTiles, SkPerlinNoiseShader::PaintingData* paintingData, @@ -616,10 +621,6 @@ private: GrTextureAccess fNoiseAccess; SkPerlinNoiseShader::PaintingData *fPaintingData; - void getConstantColorComponents(GrColor*, uint32_t* validFlags) const SK_OVERRIDE { - *validFlags = 0; // This is noise. Nothing is constant. - } - private: typedef GrFragmentProcessor INHERITED; }; |