diff options
Diffstat (limited to 'experimental')
-rw-r--r-- | experimental/SkPerlinNoiseShader2/SkPerlinNoiseShader2.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/experimental/SkPerlinNoiseShader2/SkPerlinNoiseShader2.cpp b/experimental/SkPerlinNoiseShader2/SkPerlinNoiseShader2.cpp index 091a55b4c8..c0652bfa98 100644 --- a/experimental/SkPerlinNoiseShader2/SkPerlinNoiseShader2.cpp +++ b/experimental/SkPerlinNoiseShader2/SkPerlinNoiseShader2.cpp @@ -1334,13 +1334,17 @@ sk_sp<GrFragmentProcessor> SkPerlinNoiseShader2::asFragmentProcessor(const AsFPA if (0 == fNumOctaves) { if (kFractalNoise_Type == fType) { // Extract the incoming alpha and emit rgba = (a/4, a/4, a/4, a/2) + // TODO: Either treat the output of this shader as sRGB or allow client to specify a + // color space of the noise. Either way, this case (and the GLSL) need to convert to + // the destination. sk_sp<GrFragmentProcessor> inner( - GrConstColorProcessor::Make(0x80404040, + GrConstColorProcessor::Make(GrColor4f::FromGrColor(0x80404040), GrConstColorProcessor::kModulateRGBA_InputMode)); return GrFragmentProcessor::MulOutputByInputAlpha(std::move(inner)); } // Emit zero. - return GrConstColorProcessor::Make(0x0, GrConstColorProcessor::kIgnore_InputMode); + return GrConstColorProcessor::Make(GrColor4f::TransparentBlack(), + GrConstColorProcessor::kIgnore_InputMode); } SkAutoTUnref<GrTexture> permutationsTexture( |