diff options
author | 2017-02-15 14:12:26 -0500 | |
---|---|---|
committer | 2017-02-15 20:50:31 +0000 | |
commit | eb62829a83a0a4f4fdd1230a3c08140e38052602 (patch) | |
tree | 292dc0ca14c63b0e10b7ced33b204c69abc1ce31 /src/gpu/GrRenderTargetOpList.cpp | |
parent | 63c67461ed07b5fca35182ac62657b2cb16afbb4 (diff) |
Check that coverage FPs are compatible with alpha as coverage
Change-Id: Ic3b6a02248d571e82f6729827c199d358fb75114
Reviewed-on: https://skia-review.googlesource.com/8508
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'src/gpu/GrRenderTargetOpList.cpp')
-rw-r--r-- | src/gpu/GrRenderTargetOpList.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gpu/GrRenderTargetOpList.cpp b/src/gpu/GrRenderTargetOpList.cpp index 69ba279434..b7dd37a922 100644 --- a/src/gpu/GrRenderTargetOpList.cpp +++ b/src/gpu/GrRenderTargetOpList.cpp @@ -315,6 +315,14 @@ void GrRenderTargetOpList::addDrawOp(const GrPipelineBuilder& pipelineBuilder, if (const GrFragmentProcessor* clipFP = appliedClip.clipCoverageFragmentProcessor()) { args.fAnalysis.fCoveragePOI.analyzeProcessors(&clipFP, 1); } +#ifdef SK_DEBUG + // Other than tests that exercise atypical behavior we expect all coverage FPs to be compatible + // with the coverage-as-alpha optimization. + if (!args.fAnalysis.fCoveragePOI.allProcessorsCompatibleWithCoverageAsAlpha() && + !args.fAnalysis.fCoveragePOI.isLCDCoverage()) { + GrCapsDebugf(this->caps(), "Coverage FP is not compatible with coverage as alpha.\n"); + } +#endif if (!renderTargetContext->accessRenderTarget()) { return; |