aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrFragmentProcessor.cpp
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2017-01-17 10:44:34 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-01-17 16:15:00 +0000
commitaab259ea9ecabb3addcade3fba72d777bc7673e8 (patch)
tree0bff151c79e5833805792c8839207197f36f3d47 /src/gpu/GrFragmentProcessor.cpp
parent46784be70c4712942163bb2ade9e7364bca47157 (diff)
Simplify GrProcOptInfo initialization.
Removes unused single channel tracking. Makes it so that only the op/gp can initiate lcd coverage. Makes GrProcOptInfo fragment processor analysis continuable. Change-Id: I003a8aa3836bb64d04b230ddee581dc500e613a9 Reviewed-on: https://skia-review.googlesource.com/7039 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/GrFragmentProcessor.cpp')
-rw-r--r--src/gpu/GrFragmentProcessor.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/gpu/GrFragmentProcessor.cpp b/src/gpu/GrFragmentProcessor.cpp
index 75b6af7ca7..977974d78d 100644
--- a/src/gpu/GrFragmentProcessor.cpp
+++ b/src/gpu/GrFragmentProcessor.cpp
@@ -185,7 +185,7 @@ sk_sp<GrFragmentProcessor> GrFragmentProcessor::MulOutputByInputUnpremulColor(
return;
}
- GrInvariantOutput childOutput(GrColor_WHITE, kRGBA_GrColorComponentFlags, false);
+ GrInvariantOutput childOutput(GrColor_WHITE, kRGBA_GrColorComponentFlags);
this->childProcessor(0).computeInvariantOutput(&childOutput);
if (0 == GrColorUnpackA(inout->color()) || 0 == GrColorUnpackA(childOutput.color())) {
@@ -280,7 +280,7 @@ sk_sp<GrFragmentProcessor> GrFragmentProcessor::OverrideInput(sk_sp<GrFragmentPr
GrColor4f fColor;
};
- GrInvariantOutput childOut(0x0, kNone_GrColorComponentFlags, false);
+ GrInvariantOutput childOut(0x0, kNone_GrColorComponentFlags);
fp->computeInvariantOutput(&childOut);
if (childOut.willUseInputColor()) {
return sk_sp<GrFragmentProcessor>(new ReplaceInputFragmentProcessor(std::move(fp), color));
@@ -329,9 +329,6 @@ sk_sp<GrFragmentProcessor> GrFragmentProcessor::RunInSeries(sk_sp<GrFragmentProc
bool onIsEqual(const GrFragmentProcessor&) const override { return true; }
void onComputeInvariantOutput(GrInvariantOutput* inout) const override {
- GrProcOptInfo info;
- info.calcWithInitialValues(fChildProcessors.begin(), fChildProcessors.count(),
- inout->color(), inout->validFlags(), false, false);
for (int i = 0; i < this->numChildProcessors(); ++i) {
this->childProcessor(i).computeInvariantOutput(inout);
}
@@ -343,9 +340,8 @@ sk_sp<GrFragmentProcessor> GrFragmentProcessor::RunInSeries(sk_sp<GrFragmentProc
}
// Run the through the series, do the invariant output processing, and look for eliminations.
- GrProcOptInfo info;
- info.calcWithInitialValues(sk_sp_address_as_pointer_address(series), cnt,
- 0x0, kNone_GrColorComponentFlags, false, false);
+ GrProcOptInfo info(0x0, kNone_GrColorComponentFlags);
+ info.addProcessors(sk_sp_address_as_pointer_address(series), cnt);
if (kRGBA_GrColorComponentFlags == info.validFlags()) {
// TODO: We need to preserve 4f and color spaces during invariant processing. This color
// has definitely lost precision, and could easily be in the wrong gamut (or have been