aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrXferProcessor.h
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2017-03-03 14:30:15 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-03-06 13:39:09 +0000
commit1c10fddd1f563412f501e49db1d21844c4d5b058 (patch)
treef064c851fffd89726f648d6fe68e5af8a96983be /src/gpu/GrXferProcessor.h
parentfc75b5afdef9bf896e20de9e88ca99f336616559 (diff)
Remove XP override color.
The only use case for this was using the blend constant for LCD text. Now instead of overriding the op's color with an alpha we upload the alpha as a uniform. This also removes two unused parameters from GrXferProcessor::getOptimizations. Change-Id: I8268da9904a5d26649c6ae81a5705b0930893904 Reviewed-on: https://skia-review.googlesource.com/9221 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'src/gpu/GrXferProcessor.h')
-rw-r--r--src/gpu/GrXferProcessor.h25
1 files changed, 6 insertions, 19 deletions
diff --git a/src/gpu/GrXferProcessor.h b/src/gpu/GrXferProcessor.h
index e837ed00dd..c00bcbeff2 100644
--- a/src/gpu/GrXferProcessor.h
+++ b/src/gpu/GrXferProcessor.h
@@ -111,13 +111,9 @@ public:
*/
kIgnoreColor_OptFlag = 0x1,
/**
- * Clear color stages and override input color to that returned by getOptimizations
+ * Can tweak alpha for coverage.
*/
- kOverrideColor_OptFlag = 0x2,
- /**
- * Can tweak alpha for coverage. Currently this flag should only be used by a GrDrawOp.
- */
- kCanTweakAlphaForCoverage_OptFlag = 0x4,
+ kCanTweakAlphaForCoverage_OptFlag = 0x2,
};
static const OptFlags kNone_OptFlags = (OptFlags)0;
@@ -127,16 +123,10 @@ public:
/**
* Determines which optimizations (as described by the ptFlags above) can be performed by
* the draw with this xfer processor. If this function is called, the xfer processor may change
- * its state to reflected the given blend optimizations. If the XP needs to see a specific input
- * color to blend correctly, it will set the OverrideColor flag and the output parameter
- * overrideColor will be the required value that should be passed into the XP.
- * A caller who calls this function on a XP is required to honor the returned OptFlags
- * and color values for its draw.
+ * its state to reflected the given blend optimizations. Callers are required to honor the
+ * returned OptFlags.
*/
- OptFlags getOptimizations(const FragmentProcessorAnalysis&,
- bool doesStencilWrite,
- GrColor* overrideColor,
- const GrCaps& caps) const;
+ OptFlags getOptimizations(const FragmentProcessorAnalysis&) const;
/**
* Returns whether this XP will require an Xfer barrier on the given rt. If true, outBarrierType
@@ -229,10 +219,7 @@ protected:
private:
void notifyRefCntIsZero() const final {}
- virtual OptFlags onGetOptimizations(const FragmentProcessorAnalysis&,
- bool doesStencilWrite,
- GrColor* overrideColor,
- const GrCaps& caps) const = 0;
+ virtual OptFlags onGetOptimizations(const FragmentProcessorAnalysis&) const = 0;
/**
* Sets a unique key on the GrProcessorKeyBuilder that is directly associated with this xfer