aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/effects/GrGaussianConvolutionFragmentProcessor.cpp
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2017-01-26 17:35:06 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-01-27 14:56:48 +0000
commit85eb4226a4cd8c10a0e3f3ba2f3a60efbb2dd61b (patch)
tree0f740e811d6360b4c5ae059e6a80431e8567ee43 /src/gpu/effects/GrGaussianConvolutionFragmentProcessor.cpp
parentbcda1f07d5e1b8d080e0134a24c5bc1707ef3985 (diff)
Start of rewrite of GrFragmentProcessor optimizations.
This adds a replacement for computeInvariantOutput buts does not use it yet. The replacement allows for three types of optimizations: * known input color -> known output color for GrFP elimination * tracking of whether all color processors modulate their input for the "tweak alpha" optimziation * opaqueness tracking This loses some of the generality of computInvariantOutput. It does not track the known output status of individual color components (other than opaque alpha). It does not track whether GrFragmentProcessors read their input color. It doesn't allow a processor that will receive non-constant output to advertise that it produces a constant output. These could probably be added back in the unlikely case that they prove valuable. Unlike computeInvariantOutput the optimizations are decided at instantiation time and constant colors are expressed as GrColor4f rather than GrColor. Change-Id: I684d3f9050693dde2d28154fa695e049ed8cf61a Reviewed-on: https://skia-review.googlesource.com/7481 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/effects/GrGaussianConvolutionFragmentProcessor.cpp')
-rw-r--r--src/gpu/effects/GrGaussianConvolutionFragmentProcessor.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gpu/effects/GrGaussianConvolutionFragmentProcessor.cpp b/src/gpu/effects/GrGaussianConvolutionFragmentProcessor.cpp
index 91301ff9ac..be6d4d8302 100644
--- a/src/gpu/effects/GrGaussianConvolutionFragmentProcessor.cpp
+++ b/src/gpu/effects/GrGaussianConvolutionFragmentProcessor.cpp
@@ -150,7 +150,8 @@ GrGaussianConvolutionFragmentProcessor::GrGaussianConvolutionFragmentProcessor(G
float gaussianSigma,
bool useBounds,
float bounds[2])
- : INHERITED(texture, direction, radius), fUseBounds(useBounds) {
+ : INHERITED(texture, direction, radius, ModulationFlags(texture->config()))
+ , fUseBounds(useBounds) {
this->initClassID<GrGaussianConvolutionFragmentProcessor>();
SkASSERT(radius <= kMaxKernelRadius);
int width = this->width();