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>
diff --git a/tests/GrPorterDuffTest.cpp b/tests/GrPorterDuffTest.cpp
index ec57377..eb3c9bc 100644
--- a/tests/GrPorterDuffTest.cpp
+++ b/tests/GrPorterDuffTest.cpp
@@ -70,12 +70,12 @@
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 @@
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 @@
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.");