diff options
author | Brian Salomon <bsalomon@google.com> | 2017-04-04 15:17:03 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-04-04 20:07:34 +0000 |
commit | a076d8711d24b8181f894038a4fd34d5327f1717 (patch) | |
tree | a21a88286fd99db304441440a22341bc1daea2fa /src/gpu/effects/GrPorterDuffXferProcessor.h | |
parent | a08104abf2850546d97c5d33f5fb5fabedf45466 (diff) |
Use sk_sp with GrXferProcessor and use a static factory to handle the nullptr==srcover case.
Bug: skia:
Change-Id: I9c07069fc2aae24fc2884c18939e3a649afc27e7
Reviewed-on: https://skia-review.googlesource.com/11282
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 | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/gpu/effects/GrPorterDuffXferProcessor.h b/src/gpu/effects/GrPorterDuffXferProcessor.h index 6effc18d4c..7ec0d58238 100644 --- a/src/gpu/effects/GrPorterDuffXferProcessor.h +++ b/src/gpu/effects/GrPorterDuffXferProcessor.h @@ -23,10 +23,9 @@ public: /** 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 GrProcessorAnalysisColor& color, - GrProcessorAnalysisCoverage coverage, - bool hasMixedSamples); + static sk_sp<GrXferProcessor> MakeSrcOverXferProcessor(const GrProcessorAnalysisColor&, + GrProcessorAnalysisCoverage, + bool hasMixedSamples, const GrCaps&); /** Returns a simple non-LCD porter duff blend XP with no optimizations or coverage. */ static sk_sp<GrXferProcessor> CreateNoCoverageXP(SkBlendMode); @@ -42,9 +41,10 @@ public: private: constexpr GrPorterDuffXPFactory(SkBlendMode); - GrXferProcessor* onCreateXferProcessor(const GrCaps& caps, const GrProcessorAnalysisColor&, - GrProcessorAnalysisCoverage, - bool hasMixedSamples) const override; + sk_sp<GrXferProcessor> makeXferProcessor(const GrProcessorAnalysisColor&, + GrProcessorAnalysisCoverage, + bool hasMixedSamples, + const GrCaps&) const override; AnalysisProperties analysisProperties(const GrProcessorAnalysisColor&, const GrProcessorAnalysisCoverage&, |