Index: include/gpu/effects/GrPorterDuffXferProcessor.h |
diff --git a/include/gpu/effects/GrPorterDuffXferProcessor.h b/include/gpu/effects/GrPorterDuffXferProcessor.h |
index d297e3290854c01e1d963df5c5f9f1b68fc4ac19..3dc503305f07762e40fad0088435861036d0f94b 100644 |
--- a/include/gpu/effects/GrPorterDuffXferProcessor.h |
+++ b/include/gpu/effects/GrPorterDuffXferProcessor.h |
@@ -18,13 +18,36 @@ class GrPorterDuffXPFactory : public GrXPFactory { |
public: |
static GrXPFactory* Create(SkXfermode::Mode mode); |
- bool supportsRGBCoverage(GrColor /*knownColor*/, uint32_t /*knownColorFlags*/) const override { |
- return true; |
- } |
- |
void getInvariantBlendedColor(const GrProcOptInfo& colorPOI, |
GrXPFactory::InvariantBlendedColor*) const override; |
+ static GrXferProcessor* CreateSrcOverXferProcessor(const GrCaps& caps, |
+ const GrProcOptInfo& colorPOI, |
+ const GrProcOptInfo& coveragePOI, |
+ bool hasMixedSamples, |
+ const GrXferProcessor::DstTexture*); |
+ |
+ static inline void SrcOverInvariantBlendedColor( |
+ GrColor inputColor, |
+ GrColorComponentFlags validColorFlags, |
+ bool isOpaque, |
+ GrXPFactory::InvariantBlendedColor* blendedColor) { |
+ if (!isOpaque) { |
+ blendedColor->fWillBlendWithDst = true; |
+ blendedColor->fKnownColorFlags = kNone_GrColorComponentFlags; |
+ return; |
+ } |
+ blendedColor->fWillBlendWithDst = false; |
+ |
+ blendedColor->fKnownColor = inputColor; |
+ blendedColor->fKnownColorFlags = validColorFlags; |
+ } |
+ |
+ static bool SrcOverWillNeedDstTexture(const GrCaps& caps, |
+ const GrProcOptInfo& colorPOI, |
+ const GrProcOptInfo& coveragePOI, |
+ bool hasMixedSamples); |
+ |
private: |
GrPorterDuffXPFactory(SkXfermode::Mode); |