diff options
author | egdaniel <egdaniel@google.com> | 2014-12-10 12:45:20 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-12-10 12:45:20 -0800 |
commit | 733fc2054044377e914559fa4f46db66ab7d9cea (patch) | |
tree | 1330be26c52ed58c7fba662dd54ccf0d1c1206a7 /include | |
parent | 9b33822891f8c71a314d704653ce79bed3018556 (diff) |
Fix to set correct output type when blending when we've read dst
BUG=skia:
Review URL: https://codereview.chromium.org/791143002
Diffstat (limited to 'include')
-rw-r--r-- | include/gpu/effects/GrPorterDuffXferProcessor.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/gpu/effects/GrPorterDuffXferProcessor.h b/include/gpu/effects/GrPorterDuffXferProcessor.h index 26800c7f8f..695d305ae0 100644 --- a/include/gpu/effects/GrPorterDuffXferProcessor.h +++ b/include/gpu/effects/GrPorterDuffXferProcessor.h @@ -36,6 +36,14 @@ public: /// @name Stage Output Types //// + enum PrimaryOutputType { + // Modulate color and coverage, write result as the color output. + kModulate_PrimaryOutputType, + // Combines the coverage, dst, and color as coverage * color + (1 - coverage) * dst. This + // can only be set if fDstReadKey is non-zero. + kCombineWithDst_PrimaryOutputType, + }; + enum SecondaryOutputType { // There is no secondary output kNone_SecondaryOutputType, @@ -52,6 +60,7 @@ public: kSecondaryOutputTypeCnt, }; + PrimaryOutputType primaryOutputType() const { return fPrimaryOutputType; } SecondaryOutputType secondaryOutputType() const { return fSecondaryOutputType; } GrXferProcessor::OptFlags getOptimizations(const GrProcOptInfo& colorPOI, @@ -77,6 +86,7 @@ private: if (fSrcBlend != xp.fSrcBlend || fDstBlend != xp.fDstBlend || fBlendConstant != xp.fBlendConstant || + fPrimaryOutputType != xp.fPrimaryOutputType || fSecondaryOutputType != xp.fSecondaryOutputType) { return false; } @@ -99,6 +109,7 @@ private: GrBlendCoeff fSrcBlend; GrBlendCoeff fDstBlend; GrColor fBlendConstant; + PrimaryOutputType fPrimaryOutputType; SecondaryOutputType fSecondaryOutputType; typedef GrXferProcessor INHERITED; |