aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/SerializationTest.cpp
diff options
context:
space:
mode:
authorGravatar Hal Canary <halcanary@google.com>2016-11-04 11:49:42 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2016-11-04 16:55:38 +0000
commit342b7acc46550af5fbefc6f9313231ede11ed692 (patch)
tree1077b67b06a35c49e93fd9a210204c597a6239df /tests/SerializationTest.cpp
parentd49128ab8ec6b3aadeb650074ddd8ddbdcce15eb (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/SerializationTest.cpp')
-rw-r--r--tests/SerializationTest.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/tests/SerializationTest.cpp b/tests/SerializationTest.cpp
index 0e5e8ec4fa..3de422b969 100644
--- a/tests/SerializationTest.cpp
+++ b/tests/SerializationTest.cpp
@@ -290,7 +290,7 @@ static void TestXfermodeSerialization(skiatest::Reporter* reporter) {
}
auto mode(SkXfermode::Make(static_cast<SkXfermode::Mode>(i)));
REPORTER_ASSERT(reporter, mode);
- SkAutoTUnref<SkXfermode> copy(
+ sk_sp<SkXfermode> copy(
TestFlattenableSerialization<SkXfermode>(mode.get(), true, reporter));
}
}
@@ -301,7 +301,7 @@ static void TestColorFilterSerialization(skiatest::Reporter* reporter) {
table[i] = (i * 41) % 256;
}
auto colorFilter(SkTableColorFilter::Make(table));
- SkAutoTUnref<SkColorFilter> copy(
+ sk_sp<SkColorFilter> copy(
TestFlattenableSerialization<SkColorFilter>(colorFilter.get(), true, reporter));
}
@@ -612,22 +612,22 @@ DEF_TEST(Serialization, reporter) {
sk_sp<SkShader> lightingShader = SkLightingShader::Make(diffuseShader,
normalSource,
fLights);
- SkAutoTUnref<SkShader>(TestFlattenableSerialization(lightingShader.get(), true, reporter));
+ sk_sp<SkShader>(TestFlattenableSerialization(lightingShader.get(), true, reporter));
lightingShader = SkLightingShader::Make(std::move(diffuseShader),
nullptr,
fLights);
- SkAutoTUnref<SkShader>(TestFlattenableSerialization(lightingShader.get(), true, reporter));
+ sk_sp<SkShader>(TestFlattenableSerialization(lightingShader.get(), true, reporter));
lightingShader = SkLightingShader::Make(nullptr,
std::move(normalSource),
fLights);
- SkAutoTUnref<SkShader>(TestFlattenableSerialization(lightingShader.get(), true, reporter));
+ sk_sp<SkShader>(TestFlattenableSerialization(lightingShader.get(), true, reporter));
lightingShader = SkLightingShader::Make(nullptr,
nullptr,
fLights);
- SkAutoTUnref<SkShader>(TestFlattenableSerialization(lightingShader.get(), true, reporter));
+ sk_sp<SkShader>(TestFlattenableSerialization(lightingShader.get(), true, reporter));
}
// Test NormalBevelSource serialization
@@ -635,8 +635,7 @@ DEF_TEST(Serialization, reporter) {
sk_sp<SkNormalSource> bevelSource = SkNormalSource::MakeBevel(
SkNormalSource::BevelType::kLinear, 2.0f, 5.0f);
- SkAutoTUnref<SkNormalSource>(TestFlattenableSerialization(bevelSource.get(), true,
- reporter));
+ sk_sp<SkNormalSource>(TestFlattenableSerialization(bevelSource.get(), true, reporter));
// TODO test equality?
}