aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrXferProcessor.cpp
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2017-03-16 19:51:42 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-03-16 19:51:55 +0000
commitc48af934608bbb65650641f66adb51f2102d4274 (patch)
tree7853ab4fc62a179b8192a5c25db3472dd5fe6b9a /src/gpu/GrXferProcessor.cpp
parenta839fc0b63bd68682dcf51abc77078bfea48c1a1 (diff)
Revert "Remove GrPipeline from GrDrawOp."
This reverts commit 2bf4b3a97b770811d9e0558dbbfbdb57cfafbdb7. Reason for revert: nanobench assertion Original change's description: > Remove GrPipeline from GrDrawOp. > > GrDrawOp subclasses are now free to construct their pipelines at flush time and now in theory could use multiple GrPipelines for multipass rendering. > > GrProcessorSet may be used to retain the processors from a GrPaint with "pending execution" style refs. > > NVPR and Instanced rendering are updated to create their pipelines at flush time without a GrPipelineBuilder. > > The monolithic pipeline creation/management that was on GrDrawOp is moved to GrMeshDrawOp. However, this is temporary and will be removed in coming changes. > > Change-Id: I124282e3cea5d070970b5460c8a679fcaf7a8eff > Reviewed-on: https://skia-review.googlesource.com/7279 > Commit-Queue: Brian Salomon <bsalomon@google.com> > Reviewed-by: Robert Phillips <robertphillips@google.com> > TBR=bsalomon@google.com,robertphillips@google.com,csmartdalton@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I1bc64f6cbbd5f482417637a034342c2b5371dc5c Reviewed-on: https://skia-review.googlesource.com/9817 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/GrXferProcessor.cpp')
-rw-r--r--src/gpu/GrXferProcessor.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/gpu/GrXferProcessor.cpp b/src/gpu/GrXferProcessor.cpp
index 32ab45c65e..4d877d6b27 100644
--- a/src/gpu/GrXferProcessor.cpp
+++ b/src/gpu/GrXferProcessor.cpp
@@ -176,6 +176,14 @@ SkString GrXferProcessor::BlendInfo::dump() const {
///////////////////////////////////////////////////////////////////////////////
+bool GrXPFactory::WillReadDst(const GrXPFactory* factory,
+ const GrProcessorSet::FragmentProcessorAnalysis& analysis) {
+ if (factory) {
+ return factory->willReadsDst(analysis);
+ }
+ return GrPorterDuffXPFactory::WillSrcOverReadDst(analysis);
+}
+
bool GrXPFactory::WillNeedDstTexture(const GrXPFactory* factory, const GrCaps& caps,
const GrProcessorSet::FragmentProcessorAnalysis& analysis) {
bool result;
@@ -185,6 +193,7 @@ bool GrXPFactory::WillNeedDstTexture(const GrXPFactory* factory, const GrCaps& c
} else {
result = GrPorterDuffXPFactory::WillSrcOverNeedDstTexture(caps, analysis);
}
+ SkASSERT(!(result && !WillReadDst(factory, analysis)));
return result;
}
@@ -195,14 +204,6 @@ bool GrXPFactory::CompatibleWithCoverageAsAlpha(const GrXPFactory* factory, bool
return GrPorterDuffXPFactory::SrcOverIsCompatibleWithCoverageAsAlpha();
}
-bool GrXPFactory::CanCombineOverlappedStencilAndCover(const GrXPFactory* factory,
- bool colorIsOpaque) {
- if (factory) {
- return factory->canCombineOverlappedStencilAndCover(colorIsOpaque);
- }
- return GrPorterDuffXPFactory::SrcOverCanCombineOverlappedStencilAndCover(colorIsOpaque);
-}
-
GrXferProcessor* GrXPFactory::createXferProcessor(const FragmentProcessorAnalysis& analysis,
bool hasMixedSamples,
const DstTexture* dstTexture,