Index: include/gpu/effects/GrPorterDuffXferProcessor.h |
diff --git a/include/gpu/effects/GrPorterDuffXferProcessor.h b/include/gpu/effects/GrPorterDuffXferProcessor.h |
index 26800c7f8f9387957234323f35a5b14229fc6e10..0ddfcdcd2a9594056bb12d469d5e85b5e0ca84bb 100644 |
--- a/include/gpu/effects/GrPorterDuffXferProcessor.h |
+++ b/include/gpu/effects/GrPorterDuffXferProcessor.h |
@@ -26,44 +26,20 @@ |
virtual const char* name() const { return "Porter Duff"; } |
- void getGLProcessorKey(const GrGLCaps& caps, GrProcessorKeyBuilder* b) const SK_OVERRIDE; |
+ virtual void getGLProcessorKey(const GrGLCaps& caps, |
+ GrProcessorKeyBuilder* b) const SK_OVERRIDE; |
- GrGLXferProcessor* createGLInstance() const SK_OVERRIDE; |
+ virtual GrGLFragmentProcessor* createGLInstance() const SK_OVERRIDE; |
- virtual bool hasSecondaryOutput() const SK_OVERRIDE; |
+ virtual GrXferProcessor::OptFlags getOptimizations(const GrProcOptInfo& colorPOI, |
+ const GrProcOptInfo& coveragePOI, |
+ bool isCoverageDrawing, |
+ bool colorWriteDisabled, |
+ bool doesStencilWrite, |
+ GrColor* color, |
+ uint8_t* coverage) SK_OVERRIDE; |
- /////////////////////////////////////////////////////////////////////////// |
- /// @name Stage Output Types |
- //// |
- |
- enum SecondaryOutputType { |
- // There is no secondary output |
- kNone_SecondaryOutputType, |
- // Writes coverage as the secondary output. Only set if dual source blending is supported |
- // and primary output is kModulate. |
- kCoverage_SecondaryOutputType, |
- // Writes coverage * (1 - colorA) as the secondary output. Only set if dual source blending |
- // is supported and primary output is kModulate. |
- kCoverageISA_SecondaryOutputType, |
- // Writes coverage * (1 - colorRGBA) as the secondary output. Only set if dual source |
- // blending is supported and primary output is kModulate. |
- kCoverageISC_SecondaryOutputType, |
- |
- kSecondaryOutputTypeCnt, |
- }; |
- |
- SecondaryOutputType secondaryOutputType() const { return fSecondaryOutputType; } |
- |
- GrXferProcessor::OptFlags getOptimizations(const GrProcOptInfo& colorPOI, |
- const GrProcOptInfo& coveragePOI, |
- bool isCoverageDrawing, |
- bool colorWriteDisabled, |
- bool doesStencilWrite, |
- GrColor* color, |
- uint8_t* coverage, |
- const GrDrawTargetCaps& caps) SK_OVERRIDE; |
- |
- void getBlendInfo(GrXferProcessor::BlendInfo* blendInfo) const SK_OVERRIDE { |
+ virtual void getBlendInfo(GrXferProcessor::BlendInfo* blendInfo) const SK_OVERRIDE { |
blendInfo->fSrcBlend = fSrcBlend; |
blendInfo->fDstBlend = fDstBlend; |
blendInfo->fBlendConstant = fBlendConstant; |
@@ -72,34 +48,21 @@ |
private: |
GrPorterDuffXferProcessor(GrBlendCoeff srcBlend, GrBlendCoeff dstBlend, GrColor constant); |
- bool onIsEqual(const GrXferProcessor& xpBase) const SK_OVERRIDE { |
- const GrPorterDuffXferProcessor& xp = xpBase.cast<GrPorterDuffXferProcessor>(); |
+ virtual bool onIsEqual(const GrFragmentProcessor& fpBase) const SK_OVERRIDE { |
+ const GrPorterDuffXferProcessor& xp = fpBase.cast<GrPorterDuffXferProcessor>(); |
if (fSrcBlend != xp.fSrcBlend || |
fDstBlend != xp.fDstBlend || |
- fBlendConstant != xp.fBlendConstant || |
- fSecondaryOutputType != xp.fSecondaryOutputType) { |
+ fBlendConstant != xp.fBlendConstant) { |
return false; |
} |
return true; |
} |
- void onComputeInvariantOutput(GrInvariantOutput* inout) const SK_OVERRIDE; |
- |
- GrXferProcessor::OptFlags internalGetOptimizations(const GrProcOptInfo& colorPOI, |
- const GrProcOptInfo& coveragePOI, |
- bool isCoverageDrawing, |
- bool colorWriteDisabled, |
- bool doesStencilWrite, |
- GrColor* color, |
- uint8_t* coverage); |
- |
- void calcOutputTypes(GrXferProcessor::OptFlags blendOpts, const GrDrawTargetCaps& caps, |
- bool isCoverageDrawing, bool readDst); |
+ virtual void onComputeInvariantOutput(GrInvariantOutput* inout) const SK_OVERRIDE; |
GrBlendCoeff fSrcBlend; |
GrBlendCoeff fDstBlend; |
GrColor fBlendConstant; |
- SecondaryOutputType fSecondaryOutputType; |
typedef GrXferProcessor INHERITED; |
}; |
@@ -144,8 +107,6 @@ |
return (fSrcCoeff == xpf.fSrcCoeff && fDstCoeff == xpf.fDstCoeff); |
} |
- GR_DECLARE_XP_FACTORY_TEST; |
- |
GrBlendCoeff fSrcCoeff; |
GrBlendCoeff fDstCoeff; |