diff options
author | Greg Daniel <egdaniel@google.com> | 2017-05-19 10:56:46 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-05-19 17:20:33 +0000 |
commit | 6ebe4b9dbeab68ca3b6da61fd08f22cdc080267d (patch) | |
tree | 7cd35d97370f7d85d6422a71b044c62930d20cc6 /src/gpu/GrXferProcessor.h | |
parent | 09e9f68625db41a1bdbac6738e2d4b57268ac5ca (diff) |
Fix gpu lcd blending to semi-correctly handle alpha coverage
Bug: skia:6606
Change-Id: I16ccd97f5d047eb7fddfed5310bf669e7435ccdd
Reviewed-on: https://skia-review.googlesource.com/17370
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'src/gpu/GrXferProcessor.h')
-rw-r--r-- | src/gpu/GrXferProcessor.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/gpu/GrXferProcessor.h b/src/gpu/GrXferProcessor.h index a739c8b29e..ed8e7079cb 100644 --- a/src/gpu/GrXferProcessor.h +++ b/src/gpu/GrXferProcessor.h @@ -153,6 +153,8 @@ public: */ bool hasSecondaryOutput() const; + bool isLCD() const { return fIsLCD; } + /** Returns true if this and other processor conservatively draw identically. It can only return true when the two processor are of the same subclass (i.e. they return the same object from from getFactory()). @@ -160,7 +162,7 @@ public: A return value of true from isEqual() should not be used to test whether the processor would generate the same shader code. To test for identical code generation use getGLSLProcessorKey */ - + bool isEqual(const GrXferProcessor& that) const { if (this->classID() != that.classID()) { return false; @@ -171,12 +173,15 @@ public: if (this->fDstReadUsesMixedSamples != that.fDstReadUsesMixedSamples) { return false; } + if (fIsLCD != that.fIsLCD) { + return false; + } return this->onIsEqual(that); } protected: GrXferProcessor(); - GrXferProcessor(bool willReadDstColor, bool hasMixedSamples); + GrXferProcessor(bool willReadDstColor, bool hasMixedSamples, GrProcessorAnalysisCoverage); private: /** @@ -201,8 +206,9 @@ private: virtual bool onIsEqual(const GrXferProcessor&) const = 0; - bool fWillReadDstColor; - bool fDstReadUsesMixedSamples; + bool fWillReadDstColor; + bool fDstReadUsesMixedSamples; + bool fIsLCD; typedef GrFragmentProcessor INHERITED; }; |