aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrXferProcessor.cpp
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2017-03-13 10:36:40 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-03-13 16:26:56 +0000
commit780b41fc10fb212ec6d9a9aeb7ca4cc0292fb85e (patch)
tree69aca5cd839b6bf4e054113bf499aa56dc78ec67 /src/gpu/GrXferProcessor.cpp
parent4f7062378eb7bdaf6ab19d178d54effd55adcc72 (diff)
Add query to GrXPFactory about coverage-as-alpha optimization
This will be needed to have GrDrawOps that haven't yet built pipelines. Change-Id: If5292aaa5dc9f98dccbe27be98960b630332158d Reviewed-on: https://skia-review.googlesource.com/9480 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/GrXferProcessor.cpp')
-rw-r--r--src/gpu/GrXferProcessor.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gpu/GrXferProcessor.cpp b/src/gpu/GrXferProcessor.cpp
index 3b8a2bfb87..4d877d6b27 100644
--- a/src/gpu/GrXferProcessor.cpp
+++ b/src/gpu/GrXferProcessor.cpp
@@ -197,6 +197,13 @@ bool GrXPFactory::WillNeedDstTexture(const GrXPFactory* factory, const GrCaps& c
return result;
}
+bool GrXPFactory::CompatibleWithCoverageAsAlpha(const GrXPFactory* factory, bool colorIsOpaque) {
+ if (factory) {
+ return factory->compatibleWithCoverageAsAlpha(colorIsOpaque);
+ }
+ return GrPorterDuffXPFactory::SrcOverIsCompatibleWithCoverageAsAlpha();
+}
+
GrXferProcessor* GrXPFactory::createXferProcessor(const FragmentProcessorAnalysis& analysis,
bool hasMixedSamples,
const DstTexture* dstTexture,