diff options
author | Brian Salomon <bsalomon@google.com> | 2017-02-21 11:31:40 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-02-21 18:29:37 +0000 |
commit | 00b2cca30033c984662ccc7d1eaed962b3714ad7 (patch) | |
tree | 97a07f4d63c8240eda0ab86db3e9882299b19c8e /src/gpu/effects | |
parent | 4eabd5d88aec712f5d0643a2f814aea7403d2119 (diff) |
Simplify GrPaint::isConstantBlendedColor to avoid FP analysis and XP virtual calls
This was the only non-test user of GrXPFactory::isConstantPreCoverageBlendedColor which is now removed.
Change-Id: Ic1c130d30a44e1a955b89f8912433a3c9df2e61e
Reviewed-on: https://skia-review.googlesource.com/8776
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/effects')
-rw-r--r-- | src/gpu/effects/GrCustomXfermode.cpp | 5 | ||||
-rw-r--r-- | src/gpu/effects/GrDisableColorXP.h | 4 | ||||
-rw-r--r-- | src/gpu/effects/GrPorterDuffXferProcessor.cpp | 17 |
3 files changed, 0 insertions, 26 deletions
diff --git a/src/gpu/effects/GrCustomXfermode.cpp b/src/gpu/effects/GrCustomXfermode.cpp index 36936f8db1..43042e2366 100644 --- a/src/gpu/effects/GrCustomXfermode.cpp +++ b/src/gpu/effects/GrCustomXfermode.cpp @@ -338,11 +338,6 @@ private: bool hasMixedSamples, const DstTexture*) const override; - bool isPreCoverageBlendedColorConstant(const GrProcOptInfo& colorInput, - GrColor* color) const override { - return false; - } - bool willReadsDst(const GrProcOptInfo&, const GrProcOptInfo&) const override { return true; } bool willReadDstInShader(const GrCaps&, ColorType, CoverageType) const override; diff --git a/src/gpu/effects/GrDisableColorXP.h b/src/gpu/effects/GrDisableColorXP.h index e98e71e069..e6a8d595e8 100644 --- a/src/gpu/effects/GrDisableColorXP.h +++ b/src/gpu/effects/GrDisableColorXP.h @@ -24,10 +24,6 @@ public: static const GrXPFactory* Get(); private: - bool isPreCoverageBlendedColorConstant(const GrProcOptInfo&, GrColor*) const override { - return false; - } - bool willReadsDst(const GrProcOptInfo& colorInput, const GrProcOptInfo& coverageInput) const override { return false; diff --git a/src/gpu/effects/GrPorterDuffXferProcessor.cpp b/src/gpu/effects/GrPorterDuffXferProcessor.cpp index 6b7d0ba025..1554b0cce0 100644 --- a/src/gpu/effects/GrPorterDuffXferProcessor.cpp +++ b/src/gpu/effects/GrPorterDuffXferProcessor.cpp @@ -765,23 +765,6 @@ GrXferProcessor* GrPorterDuffXPFactory::onCreateXferProcessor(const GrCaps& caps SkASSERT(!dstTexture || !dstTexture->texture()); return new PorterDuffXferProcessor(blendFormula); } -bool GrPorterDuffXPFactory::isPreCoverageBlendedColorConstant(const GrProcOptInfo& colorInput, - GrColor* color) const { - BlendFormula colorFormula = gBlendTable[colorInput.isOpaque()][0][(int)fBlendMode]; - SkASSERT(kAdd_GrBlendEquation == colorFormula.fBlendEquation); - if (colorFormula.usesDstColor()) { - return false; - } - switch (colorFormula.fSrcCoeff) { - case kZero_GrBlendCoeff: - *color = GrColor_TRANSPARENT_BLACK; - return true; - case kOne_GrBlendCoeff: - return colorInput.hasKnownOutputColor(color); - default: - return false; - } -} bool GrPorterDuffXPFactory::willReadsDst(const GrProcOptInfo& colorInput, const GrProcOptInfo& coverageInput) const { |