Index: include/gpu/effects/GrPorterDuffXferProcessor.h |
diff --git a/include/gpu/effects/GrPorterDuffXferProcessor.h b/include/gpu/effects/GrPorterDuffXferProcessor.h |
index be014a6b04822387c191286f315001c69717f431..457c6eabc8c4f451d0935b6bc0b505863e6c5836 100644 |
--- a/include/gpu/effects/GrPorterDuffXferProcessor.h |
+++ b/include/gpu/effects/GrPorterDuffXferProcessor.h |
@@ -21,10 +21,16 @@ public: |
void getInvariantBlendedColor(const GrProcOptInfo& colorPOI, |
GrXPFactory::InvariantBlendedColor*) const override; |
+ |
+ /** Because src-over is so common we special case it for performance reasons. If this returns |
+ null then the SimpleSrcOverXP() below should be used. */ |
static GrXferProcessor* CreateSrcOverXferProcessor(const GrCaps& caps, |
const GrPipelineOptimizations& optimizations, |
bool hasMixedSamples, |
const GrXferProcessor::DstTexture*); |
+ /** This XP implements non-LCD src-over using hw blend with no optimizations. It is returned |
+ by reference because it is global and its ref-cnting methods are not thread safe. */ |
+ static const GrXferProcessor& SimpleSrcOverXP(); |
static inline void SrcOverInvariantBlendedColor( |
GrColor inputColor, |