Generate identical shader keys for X and Y blurs when there is no domain
This mirrors the logic in emitCode, and avoids extra shader compiles.
Change-Id: I2c11e082dfa2b9fc673dc2b8fdf2f0b964407b90
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/227777
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
diff --git a/src/gpu/effects/GrGaussianConvolutionFragmentProcessor.cpp b/src/gpu/effects/GrGaussianConvolutionFragmentProcessor.cpp
index d79444d..33d916c 100644
--- a/src/gpu/effects/GrGaussianConvolutionFragmentProcessor.cpp
+++ b/src/gpu/effects/GrGaussianConvolutionFragmentProcessor.cpp
@@ -176,7 +176,9 @@
processor.cast<GrGaussianConvolutionFragmentProcessor>();
uint32_t key = conv.radius();
key <<= 3;
- key |= Direction::kY == conv.direction() ? 0x4 : 0x0;
+ if (conv.useBounds()) {
+ key |= Direction::kY == conv.direction() ? 0x4 : 0x0;
+ }
key |= static_cast<uint32_t>(conv.mode());
b->add32(key);
}