diff options
author | Hal Canary <halcanary@google.com> | 2016-11-04 11:49:42 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2016-11-04 16:55:38 +0000 |
commit | 342b7acc46550af5fbefc6f9313231ede11ed692 (patch) | |
tree | 1077b67b06a35c49e93fd9a210204c597a6239df /tests/GrPorterDuffTest.cpp | |
parent | d49128ab8ec6b3aadeb650074ddd8ddbdcce15eb (diff) |
tests: s/SkAutoTUnref/sk_sp/
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4394
Change-Id: I088b3c6e2adff07abed1e8a50091cc0ec4a4109c
Reviewed-on: https://skia-review.googlesource.com/4394
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
Diffstat (limited to 'tests/GrPorterDuffTest.cpp')
-rw-r--r-- | tests/GrPorterDuffTest.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/tests/GrPorterDuffTest.cpp b/tests/GrPorterDuffTest.cpp index ec57377a58..eb3c9bc186 100644 --- a/tests/GrPorterDuffTest.cpp +++ b/tests/GrPorterDuffTest.cpp @@ -70,12 +70,12 @@ public: XPInfo(skiatest::Reporter* reporter, SkBlendMode xfermode, const GrCaps& caps, const GrPipelineOptimizations& optimizations) { sk_sp<GrXPFactory> xpf(GrPorterDuffXPFactory::Make(xfermode)); - SkAutoTUnref<GrXferProcessor> xp( + sk_sp<GrXferProcessor> xp( xpf->createXferProcessor(optimizations, false, nullptr, caps)); TEST_ASSERT(!xpf->willNeedDstTexture(caps, optimizations)); xpf->getInvariantBlendedColor(optimizations.fColorPOI, &fBlendedColor); fOptFlags = xp->getOptimizations(optimizations, false, nullptr, caps); - GetXPOutputTypes(xp, &fPrimaryOutputType, &fSecondaryOutputType); + GetXPOutputTypes(xp.get(), &fPrimaryOutputType, &fSecondaryOutputType); xp->getBlendInfo(&fBlendInfo); TEST_ASSERT(!xp->willReadDstColor()); TEST_ASSERT(xp->hasSecondaryOutput() == GrBlendCoeffRefsSrc2(fBlendInfo.fDstBlend)); @@ -1124,8 +1124,7 @@ static void test_lcd_coverage_fallback_case(skiatest::Reporter* reporter, const sk_sp<GrXPFactory> xpf(GrPorterDuffXPFactory::Make(SkBlendMode::kSrcOver)); TEST_ASSERT(!xpf->willNeedDstTexture(caps, opts)); - SkAutoTUnref<GrXferProcessor> xp( - xpf->createXferProcessor(opts, false, nullptr, caps)); + sk_sp<GrXferProcessor> xp(xpf->createXferProcessor(opts, false, nullptr, caps)); if (!xp) { ERRORF(reporter, "Failed to create an XP with LCD coverage."); return; @@ -1199,7 +1198,7 @@ DEF_GPUTEST(PorterDuffNoDualSourceBlending, reporter, /*factory*/) { sk_sp<GrXPFactory> xpf(GrPorterDuffXPFactory::Make(xfermode)); GrXferProcessor::DstTexture* dstTexture = xpf->willNeedDstTexture(caps, optimizations) ? &fakeDstTexture : 0; - SkAutoTUnref<GrXferProcessor> xp( + sk_sp<GrXferProcessor> xp( xpf->createXferProcessor(optimizations, false, dstTexture, caps)); if (!xp) { ERRORF(reporter, "Failed to create an XP without dual source blending."); |