diff options
author | Brian Salomon <bsalomon@google.com> | 2017-06-05 12:25:13 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-06-05 16:47:45 +0000 |
commit | 28207df02b3dee83141520adf23df2c6aa087860 (patch) | |
tree | fdb76a0617c00df12eb900a1c44a87eafaf87692 /src/gpu/GrProcessorAnalysis.cpp | |
parent | c1359888c021ad4594d22d849b2414fd0cdec6f5 (diff) |
Make GrSimpleMeshDrawOpHelper record whether coverage can be implemented as alpha
This also makes the blend table entry for opaque src over indicate a blend of (1, ISA) rather than (1, 0) to match the actual implementation of the global src-over XP.
Change-Id: I1b1f64d2546e4f0cf03c0239ce674d1baad655f6
Reviewed-on: https://skia-review.googlesource.com/18521
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/GrProcessorAnalysis.cpp')
-rw-r--r-- | src/gpu/GrProcessorAnalysis.cpp | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/gpu/GrProcessorAnalysis.cpp b/src/gpu/GrProcessorAnalysis.cpp index 317246d247..118e93da0b 100644 --- a/src/gpu/GrProcessorAnalysis.cpp +++ b/src/gpu/GrProcessorAnalysis.cpp @@ -27,14 +27,17 @@ void GrColorFragmentProcessorAnalysis::analyzeProcessors( // processors. fAllProcessorsCompatibleWithCoverageAsAlpha = true; fUsesLocalCoords = false; - } else if (fIsOpaque && !fp->preservesOpaqueInput()) { - fIsOpaque = false; - } - if (fAllProcessorsCompatibleWithCoverageAsAlpha && !fp->compatibleWithCoverageAsAlpha()) { - fAllProcessorsCompatibleWithCoverageAsAlpha = false; - } - if (fp->usesLocalCoords()) { - fUsesLocalCoords = true; + } else { + if (fIsOpaque && !fp->preservesOpaqueInput()) { + fIsOpaque = false; + } + if (fAllProcessorsCompatibleWithCoverageAsAlpha && + !fp->compatibleWithCoverageAsAlpha()) { + fAllProcessorsCompatibleWithCoverageAsAlpha = false; + } + if (fp->usesLocalCoords()) { + fUsesLocalCoords = true; + } } ++fTotalProcessorsVisited; } |