diff options
author | 2017-03-13 10:36:40 -0400 | |
---|---|---|
committer | 2017-03-13 16:26:56 +0000 | |
commit | 780b41fc10fb212ec6d9a9aeb7ca4cc0292fb85e (patch) | |
tree | 69aca5cd839b6bf4e054113bf499aa56dc78ec67 /src/gpu/effects/GrPorterDuffXferProcessor.h | |
parent | 4f7062378eb7bdaf6ab19d178d54effd55adcc72 (diff) |
Add query to GrXPFactory about coverage-as-alpha optimization
This will be needed to have GrDrawOps that haven't yet built pipelines.
Change-Id: If5292aaa5dc9f98dccbe27be98960b630332158d
Reviewed-on: https://skia-review.googlesource.com/9480
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/effects/GrPorterDuffXferProcessor.h')
-rw-r--r-- | src/gpu/effects/GrPorterDuffXferProcessor.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gpu/effects/GrPorterDuffXferProcessor.h b/src/gpu/effects/GrPorterDuffXferProcessor.h index b82c1068ff..dd790e8431 100644 --- a/src/gpu/effects/GrPorterDuffXferProcessor.h +++ b/src/gpu/effects/GrPorterDuffXferProcessor.h @@ -38,9 +38,8 @@ public: static const GrXferProcessor& SimpleSrcOverXP(); static bool WillSrcOverReadDst(const FragmentProcessorAnalysis& analysis); - static bool IsSrcOverPreCoverageBlendedColorConstant(const GrProcOptInfo& colorInput, - GrColor* color); static bool WillSrcOverNeedDstTexture(const GrCaps&, const FragmentProcessorAnalysis&); + static bool SrcOverIsCompatibleWithCoverageAsAlpha() { return true; } private: constexpr GrPorterDuffXPFactory(SkBlendMode); @@ -54,6 +53,8 @@ private: bool willReadDstInShader(const GrCaps&, const FragmentProcessorAnalysis&) const override; + bool compatibleWithCoverageAsAlpha(bool colorIsOpaque) const override; + GR_DECLARE_XP_FACTORY_TEST; static void TestGetXPOutputTypes(const GrXferProcessor*, int* outPrimary, int* outSecondary); |