aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrPipeline.cpp
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2017-04-08 02:53:30 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-04-08 02:53:38 +0000
commit5dac9b3b5bf7e9c06c207cb92e257535c7d9ec95 (patch)
tree78054390590c5388b9a12525d1fee763ba3f105c /src/gpu/GrPipeline.cpp
parent0ae0e23696f2ef08503040f8c02765eb58b26ddf (diff)
Revert "Create GrXferProcessor while doing GrProcessorSet analysis."
This reverts commit 0ae0e23696f2ef08503040f8c02765eb58b26ddf. Reason for revert: static assert failure on ios build Original change's description: > Create GrXferProcessor while doing GrProcessorSet analysis. > > > Bug: skia: > Change-Id: I62a628f9c0536ffb05c8f9d0c9ded5657f93b48e > Reviewed-on: https://skia-review.googlesource.com/11482 > Reviewed-by: Greg Daniel <egdaniel@google.com> > Commit-Queue: Brian Salomon <bsalomon@google.com> > TBR=egdaniel@google.com,bsalomon@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: Ifd57367b0326dd2b53c622705a868e246645d589 Reviewed-on: https://skia-review.googlesource.com/12104 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/GrPipeline.cpp')
-rw-r--r--src/gpu/GrPipeline.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/gpu/GrPipeline.cpp b/src/gpu/GrPipeline.cpp
index d1f5931d9a..759f97ce2c 100644
--- a/src/gpu/GrPipeline.cpp
+++ b/src/gpu/GrPipeline.cpp
@@ -20,8 +20,6 @@
void GrPipeline::init(const InitArgs& args) {
SkASSERT(args.fRenderTarget);
- SkASSERT(args.fProcessors);
- SkASSERT(args.fProcessors->isFinalized());
fRenderTarget.reset(args.fRenderTarget);
@@ -50,8 +48,17 @@ void GrPipeline::init(const InitArgs& args) {
fDrawFace = static_cast<int16_t>(args.fDrawFace);
- fXferProcessor.reset(args.fProcessors->xferProcessor());
+ bool isHWAA = kHWAntialias_Flag & args.fFlags;
+ // Create XferProcessor from DS's XPFactory
+ {
+ bool hasMixedSamples =
+ args.fRenderTarget->isMixedSampled() && (isHWAA || this->isStencilEnabled());
+ sk_sp<GrXferProcessor> xferProcessor =
+ GrXPFactory::MakeXferProcessor(args.fProcessors->xpFactory(), args.fXPInputColor,
+ args.fXPInputCoverage, hasMixedSamples, *args.fCaps);
+ fXferProcessor.reset(xferProcessor.get());
+ }
if (args.fDstTexture.texture()) {
fDstTexture.reset(args.fDstTexture.texture());
fDstTextureOffset = args.fDstTexture.offset();