Index: include/gpu/GrXferProcessor.h |
diff --git a/include/gpu/GrXferProcessor.h b/include/gpu/GrXferProcessor.h |
index 80e375c03c36279fb1c9f68f07a8b0dc9b6d5492..98585c6a5374b311ef532b352567c158a26977eb 100644 |
--- a/include/gpu/GrXferProcessor.h |
+++ b/include/gpu/GrXferProcessor.h |
@@ -180,13 +180,21 @@ public: |
virtual bool canApplyCoverage(const GrProcOptInfo& colorPOI, const GrProcOptInfo& coveragePOI, |
bool colorWriteDisabled) const = 0; |
- /** |
- * This function returns true if the destination pixel values will be read for blending during |
- * draw. |
+ |
+ struct InvariantOutput { |
+ bool fWillBlendWithDst; |
+ GrColor fBlendedColor; |
+ uint32_t fBlendedColorFlags; |
+ }; |
+ |
+ /** |
+ * This function returns known information about the output of the xfer processor produced by |
+ * this xp factory. The invariant color information returned by this function refers to the |
+ * final color produced after all blending. |
*/ |
// TODO: remove need for colorWriteDisabled once only XP can read dst. |
- virtual bool willBlendWithDst(const GrProcOptInfo& colorPOI, const GrProcOptInfo& coveragePOI, |
- bool colorWriteDisabled) const = 0; |
+ virtual void getInvariantOutput(const GrProcOptInfo& colorPOI, const GrProcOptInfo& coveragePOI, |
+ bool colorWriteDisabled, InvariantOutput*) const = 0; |
/** |
* Determines whether multiplying the computed per-pixel color by the pixel's fractional |
@@ -195,10 +203,6 @@ public: |
*/ |
virtual bool canTweakAlphaForCoverage() const = 0; |
- virtual bool getOpaqueAndKnownColor(const GrProcOptInfo& colorPOI, |
- const GrProcOptInfo& coveragePOI, GrColor* solidColor, |
- uint32_t* solidColorKnownComponents) const = 0; |
- |
bool isEqual(const GrXPFactory& that) const { |
if (this->classID() != that.classID()) { |
return false; |