From d61c9d93b126dca0af17eff89be8536944dadf81 Mon Sep 17 00:00:00 2001 From: Brian Salomon Date: Mon, 10 Apr 2017 10:54:25 -0400 Subject: Move ref counting out of GrProcessor and into subclasses. This will allow different subclasses to use different models for lifetime management. GrXferProcessor moves to simple ref counting since they don't own GrGpuResources. This also constifies GrXferProcessor factories. Change-Id: I6bea0ea8de718874063224232f9da50887868b16 Reviewed-on: https://skia-review.googlesource.com/11792 Commit-Queue: Brian Salomon Reviewed-by: Brian Osman --- tests/GrPorterDuffTest.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'tests/GrPorterDuffTest.cpp') diff --git a/tests/GrPorterDuffTest.cpp b/tests/GrPorterDuffTest.cpp index 4066d28503..f4b74c7cda 100644 --- a/tests/GrPorterDuffTest.cpp +++ b/tests/GrPorterDuffTest.cpp @@ -79,7 +79,7 @@ public: fCompatibleWithCoverageAsAlpha = analysis.isCompatibleWithCoverageAsAlpha(); fCanCombineOverlappedStencilAndCover = analysis.canCombineOverlappedStencilAndCover(); fIgnoresInputColor = analysis.inputColorIsIgnored(); - sk_sp xp( + sk_sp xp( GrXPFactory::MakeXferProcessor(xpf, inputColor, inputCoverage, false, caps)); TEST_ASSERT(!analysis.requiresDstTexture()); GetXPOutputTypes(xp.get(), &fPrimaryOutputType, &fSecondaryOutputType); @@ -1006,7 +1006,8 @@ 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(GrXPFactory::MakeXferProcessor(xpf, color, coverage, false, caps)); + sk_sp xp( + GrXPFactory::MakeXferProcessor(xpf, color, coverage, false, caps)); if (!xp) { ERRORF(reporter, "Failed to create an XP with LCD coverage."); return; @@ -1054,7 +1055,7 @@ DEF_GPUTEST(PorterDuffNoDualSourceBlending, reporter, /*factory*/) { for (int m = 0; m <= (int)SkBlendMode::kLastCoeffMode; m++) { SkBlendMode xfermode = static_cast(m); const GrXPFactory* xpf = GrPorterDuffXPFactory::Get(xfermode); - sk_sp xp( + sk_sp xp( GrXPFactory::MakeXferProcessor(xpf, colorInput, coverageType, false, caps)); if (!xp) { ERRORF(reporter, "Failed to create an XP without dual source blending."); -- cgit v1.2.3