aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/effects
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2017-01-23 14:35:25 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-01-23 20:17:53 +0000
commit5f13fbac19ee0ea9a3d5216740912d377a30d622 (patch)
tree45f1becca7239814f3abf23a5f73c68a041a8727 /src/gpu/effects
parent319ba3d3a177498095c31696e0aec8b3af25f663 (diff)
Stop tracking whether GrFragmentProcessors read their input
Change-Id: Id5338901978b97289798eaef873527597bd8dfd6 Reviewed-on: https://skia-review.googlesource.com/7414 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'src/gpu/effects')
-rw-r--r--src/gpu/effects/GrConstColorProcessor.cpp3
-rw-r--r--src/gpu/effects/GrDitherEffect.cpp2
-rw-r--r--src/gpu/effects/GrGammaEffect.cpp2
-rw-r--r--src/gpu/effects/GrXfermodeFragmentProcessor.cpp17
-rw-r--r--src/gpu/effects/GrYUVEffect.cpp5
5 files changed, 8 insertions, 21 deletions
diff --git a/src/gpu/effects/GrConstColorProcessor.cpp b/src/gpu/effects/GrConstColorProcessor.cpp
index 0efe997f78..e6568793df 100644
--- a/src/gpu/effects/GrConstColorProcessor.cpp
+++ b/src/gpu/effects/GrConstColorProcessor.cpp
@@ -64,8 +64,7 @@ private:
void GrConstColorProcessor::onComputeInvariantOutput(GrInvariantOutput* inout) const {
if (kIgnore_InputMode == fMode) {
- inout->setToOther(kRGBA_GrColorComponentFlags, fColor.toGrColor(),
- GrInvariantOutput::kWillNot_ReadInput);
+ inout->setToOther(kRGBA_GrColorComponentFlags, fColor.toGrColor());
} else {
float r = fColor.fRGBA[0];
bool colorIsSingleChannel = r == fColor.fRGBA[1] && r == fColor.fRGBA[2] &&
diff --git a/src/gpu/effects/GrDitherEffect.cpp b/src/gpu/effects/GrDitherEffect.cpp
index a93e74f412..2ba47d2e09 100644
--- a/src/gpu/effects/GrDitherEffect.cpp
+++ b/src/gpu/effects/GrDitherEffect.cpp
@@ -45,7 +45,7 @@ private:
};
void DitherEffect::onComputeInvariantOutput(GrInvariantOutput* inout) const {
- inout->setToUnknown(GrInvariantOutput::kWill_ReadInput);
+ inout->setToUnknown();
}
//////////////////////////////////////////////////////////////////////////////
diff --git a/src/gpu/effects/GrGammaEffect.cpp b/src/gpu/effects/GrGammaEffect.cpp
index 765612052c..8b9363e843 100644
--- a/src/gpu/effects/GrGammaEffect.cpp
+++ b/src/gpu/effects/GrGammaEffect.cpp
@@ -109,7 +109,7 @@ bool GrGammaEffect::onIsEqual(const GrFragmentProcessor& s) const {
}
void GrGammaEffect::onComputeInvariantOutput(GrInvariantOutput* inout) const {
- inout->setToUnknown(GrInvariantOutput::kWill_ReadInput);
+ inout->setToUnknown();
}
///////////////////////////////////////////////////////////////////////////////
diff --git a/src/gpu/effects/GrXfermodeFragmentProcessor.cpp b/src/gpu/effects/GrXfermodeFragmentProcessor.cpp
index d3eaee338d..d98478747a 100644
--- a/src/gpu/effects/GrXfermodeFragmentProcessor.cpp
+++ b/src/gpu/effects/GrXfermodeFragmentProcessor.cpp
@@ -42,7 +42,7 @@ protected:
}
void onComputeInvariantOutput(GrInvariantOutput* inout) const override {
- inout->setToUnknown(GrInvariantOutput::kWill_ReadInput);
+ inout->setToUnknown();
}
private:
@@ -197,20 +197,9 @@ protected:
inout->color(), inout->validFlags(),
&blendColor, &blendFlags);
}
- // will the shader code reference the input color?
- GrInvariantOutput::ReadInput readsInput = GrInvariantOutput::kWillNot_ReadInput;
- if (kDst_Child == fChild) {
- if (kZero_GrBlendCoeff != srcCoeff || GrBlendCoeffRefsSrc(dstCoeff)) {
- readsInput = GrInvariantOutput::kWill_ReadInput;
- }
- } else {
- if (kZero_GrBlendCoeff != dstCoeff || GrBlendCoeffRefsDst(srcCoeff)) {
- readsInput = GrInvariantOutput::kWill_ReadInput;
- }
- }
- inout->setToOther(blendFlags, blendColor, readsInput);
+ inout->setToOther(blendFlags, blendColor);
} else {
- inout->setToUnknown(GrInvariantOutput::kWill_ReadInput);
+ inout->setToUnknown();
}
}
diff --git a/src/gpu/effects/GrYUVEffect.cpp b/src/gpu/effects/GrYUVEffect.cpp
index 41bab180ba..6b15c0dc72 100644
--- a/src/gpu/effects/GrYUVEffect.cpp
+++ b/src/gpu/effects/GrYUVEffect.cpp
@@ -187,8 +187,7 @@ private:
void onComputeInvariantOutput(GrInvariantOutput* inout) const override {
// YUV is opaque
- inout->setToOther(kA_GrColorComponentFlag, 0xFF << GrColor_SHIFT_A,
- GrInvariantOutput::kWillNot_ReadInput);
+ inout->setToOther(kA_GrColorComponentFlag, 0xFF << GrColor_SHIFT_A);
}
GrCoordTransform fYTransform;
@@ -348,7 +347,7 @@ private:
}
void onComputeInvariantOutput(GrInvariantOutput* inout) const override {
- inout->setToUnknown(GrInvariantOutput::kWillNot_ReadInput);
+ inout->setToUnknown();
}
GrCoordTransform fTransform;