aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2017-04-03 16:57:43 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-04-03 21:35:47 +0000
commit18dfa980765bee6a1ce7c5f430cb32f487da6590 (patch)
treef82444c520111b4710746480652fde74d2db3815 /tests
parentb9c4a6fc7de252633f16d11c2df10ee6de16af03 (diff)
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 <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/GrPorterDuffTest.cpp10
1 files changed, 4 insertions, 6 deletions
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<GrXferProcessor> 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<GrXferProcessor> xp(xpf->createXferProcessor(color, coverage, false, nullptr, caps));
+ sk_sp<GrXferProcessor> 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<GrXferProcessor> xp(xpf->createXferProcessor(colorInput, coverageType, false,
- dstTexture, caps));
+ sk_sp<GrXferProcessor> xp(
+ xpf->createXferProcessor(colorInput, coverageType, false, caps));
if (!xp) {
ERRORF(reporter, "Failed to create an XP without dual source blending.");
return;