Index: include/gpu/effects/GrPorterDuffXferProcessor.h |
diff --git a/include/gpu/effects/GrPorterDuffXferProcessor.h b/include/gpu/effects/GrPorterDuffXferProcessor.h |
index af10fa23ec1fbff1b51d3cdc993bee4b120b48f9..e47ec1e9048b9d3cd4de3863362a69cdcfce7853 100644 |
--- a/include/gpu/effects/GrPorterDuffXferProcessor.h |
+++ b/include/gpu/effects/GrPorterDuffXferProcessor.h |
@@ -12,21 +12,22 @@ |
#include "GrXferProcessor.h" |
#include "SkXfermode.h" |
+class GrDrawTargetCaps; |
class GrProcOptInfo; |
class GrPorterDuffXferProcessor : public GrXferProcessor { |
public: |
static GrXferProcessor* Create(GrBlendCoeff srcBlend, GrBlendCoeff dstBlend, |
- GrColor constant = 0) { |
- return SkNEW_ARGS(GrPorterDuffXferProcessor, (srcBlend, dstBlend, constant)); |
+ GrColor constant, const GrDeviceCoordTexture* dstCopy, |
+ bool willReadDstColor) { |
+ return SkNEW_ARGS(GrPorterDuffXferProcessor, (srcBlend, dstBlend, constant, dstCopy, |
+ willReadDstColor)); |
} |
~GrPorterDuffXferProcessor() SK_OVERRIDE; |
const char* name() const SK_OVERRIDE { return "Porter Duff"; } |
- void getGLProcessorKey(const GrGLCaps& caps, GrProcessorKeyBuilder* b) const SK_OVERRIDE; |
- |
GrGLXferProcessor* createGLInstance() const SK_OVERRIDE; |
bool hasSecondaryOutput() const SK_OVERRIDE; |
@@ -75,7 +76,10 @@ public: |
} |
private: |
- GrPorterDuffXferProcessor(GrBlendCoeff srcBlend, GrBlendCoeff dstBlend, GrColor constant); |
+ GrPorterDuffXferProcessor(GrBlendCoeff srcBlend, GrBlendCoeff dstBlend, GrColor constant, |
+ const GrDeviceCoordTexture* dstCopy, bool willReadDstColor); |
+ |
+ void onGetGLProcessorKey(const GrGLCaps& caps, GrProcessorKeyBuilder* b) const SK_OVERRIDE; |
bool onIsEqual(const GrXferProcessor& xpBase) const SK_OVERRIDE { |
const GrPorterDuffXferProcessor& xp = xpBase.cast<GrPorterDuffXferProcessor>(); |
@@ -119,9 +123,6 @@ public: |
return SkNEW_ARGS(GrPorterDuffXPFactory, (src, dst)); |
} |
- GrXferProcessor* createXferProcessor(const GrProcOptInfo& colorPOI, |
- const GrProcOptInfo& coveragePOI) const SK_OVERRIDE; |
- |
bool supportsRGBCoverage(GrColor knownColor, uint32_t knownColorFlags) const SK_OVERRIDE; |
bool canApplyCoverage(const GrProcOptInfo& colorPOI, |
@@ -132,11 +133,15 @@ public: |
void getInvariantOutput(const GrProcOptInfo& colorPOI, const GrProcOptInfo& coveragePOI, |
GrXPFactory::InvariantOutput*) const SK_OVERRIDE; |
- bool willReadDst() const SK_OVERRIDE { return false; } |
- |
private: |
GrPorterDuffXPFactory(GrBlendCoeff src, GrBlendCoeff dst); |
+ GrXferProcessor* onCreateXferProcessor(const GrProcOptInfo& colorPOI, |
+ const GrProcOptInfo& coveragePOI, |
+ const GrDeviceCoordTexture* dstCopy) const SK_OVERRIDE; |
+ |
+ bool willReadDstColor() const SK_OVERRIDE; |
+ |
bool onIsEqual(const GrXPFactory& xpfBase) const SK_OVERRIDE { |
const GrPorterDuffXPFactory& xpf = xpfBase.cast<GrPorterDuffXPFactory>(); |
return (fSrcCoeff == xpf.fSrcCoeff && fDstCoeff == xpf.fDstCoeff); |