From 18dfa980765bee6a1ce7c5f430cb32f487da6590 Mon Sep 17 00:00:00 2001 From: Brian Salomon Date: Mon, 3 Apr 2017 16:57:43 -0400 Subject: Store the dst texture used by an XP in GrPipeline rather than in the XP. This will allow the XP to be created before the dst texture. Change-Id: I3e5bdfa8e5d47e58a3560792ce5cf3899d30a024 Reviewed-on: https://skia-review.googlesource.com/11011 Commit-Queue: Brian Salomon Reviewed-by: Greg Daniel --- tests/GrPorterDuffTest.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'tests/GrPorterDuffTest.cpp') diff --git a/tests/GrPorterDuffTest.cpp b/tests/GrPorterDuffTest.cpp index a2ba9167bb..28465c2e81 100644 --- a/tests/GrPorterDuffTest.cpp +++ b/tests/GrPorterDuffTest.cpp @@ -66,7 +66,7 @@ public: fCanCombineOverlappedStencilAndCover = analysis.canCombineOverlappedStencilAndCover(); fIgnoresInputColor = analysis.isInputColorIgnored(); sk_sp xp( - xpf->createXferProcessor(inputColor, inputCoverage, false, nullptr, caps)); + xpf->createXferProcessor(inputColor, inputCoverage, false, caps)); TEST_ASSERT(!analysis.requiresDstTexture()); GetXPOutputTypes(xp.get(), &fPrimaryOutputType, &fSecondaryOutputType); xp->getBlendInfo(&fBlendInfo); @@ -992,7 +992,7 @@ static void test_lcd_coverage_fallback_case(skiatest::Reporter* reporter, const GrProcessorAnalysisCoverage coverage = GrProcessorAnalysisCoverage::kLCD; SkASSERT(!(GrXPFactory::GetAnalysisProperties(xpf, color, coverage, caps) & GrXPFactory::AnalysisProperties::kRequiresDstTexture)); - sk_sp xp(xpf->createXferProcessor(color, coverage, false, nullptr, caps)); + sk_sp xp(xpf->createXferProcessor(color, coverage, false, caps)); if (!xp) { ERRORF(reporter, "Failed to create an XP with LCD coverage."); return; @@ -1042,10 +1042,8 @@ DEF_GPUTEST(PorterDuffNoDualSourceBlending, reporter, /*factory*/) { const GrXPFactory* xpf = GrPorterDuffXPFactory::Get(xfermode); GrProcessorSet::Analysis analysis; analysis = GrProcessorSet::Analysis(colorInput, coverageType, xpf, caps); - GrXferProcessor::DstTexture* dstTexture = - analysis.requiresDstTexture() ? &fakeDstTexture : nullptr; - sk_sp xp(xpf->createXferProcessor(colorInput, coverageType, false, - dstTexture, caps)); + sk_sp xp( + xpf->createXferProcessor(colorInput, coverageType, false, caps)); if (!xp) { ERRORF(reporter, "Failed to create an XP without dual source blending."); return; -- cgit v1.2.3