Index: tests/LayerRasterizerTest.cpp |
diff --git a/tests/LayerRasterizerTest.cpp b/tests/LayerRasterizerTest.cpp |
index a81cca40370e440c96fd57996df5964b54e061e5..b71c305d59740a67d545db5a38e203780c3e87c6 100644 |
--- a/tests/LayerRasterizerTest.cpp |
+++ b/tests/LayerRasterizerTest.cpp |
@@ -49,7 +49,7 @@ SkFlattenable* DummyRasterizer::CreateProc(SkReadBuffer&) { return new DummyRast |
DEF_TEST(LayerRasterizer_destructor, reporter) { |
{ |
SkPaint paint; |
- paint.setRasterizer(new DummyRasterizer)->unref(); |
+ paint.setRasterizer(sk_make_sp<DummyRasterizer>()); |
REPORTER_ASSERT(reporter, DummyRasterizer::GetCount() == 1); |
SkLayerRasterizer::Builder builder; |
@@ -81,7 +81,7 @@ static bool equals(const SkLayerRasterizer_Rec& rec1, const SkLayerRasterizer_Re |
DEF_TEST(LayerRasterizer_copy, reporter) { |
SkLayerRasterizer::Builder builder; |
- REPORTER_ASSERT(reporter, nullptr == builder.snapshotRasterizer()); |
+ REPORTER_ASSERT(reporter, nullptr == builder.snapshot()); |
SkPaint paint; |
// Create a bunch of paints with different flags. |
for (uint32_t flags = 0x01; flags < SkPaint::kAllFlags; flags <<= 1) { |
@@ -90,14 +90,14 @@ DEF_TEST(LayerRasterizer_copy, reporter) { |
} |
// Create a layer rasterizer with all the existing layers. |
- SkAutoTUnref<SkLayerRasterizer> firstCopy(builder.snapshotRasterizer()); |
+ sk_sp<SkLayerRasterizer> firstCopy(builder.snapshot()); |
// Add one more layer. |
paint.setFlags(SkPaint::kAllFlags); |
builder.addLayer(paint); |
- SkAutoTUnref<SkLayerRasterizer> oneLarger(builder.snapshotRasterizer()); |
- SkAutoTUnref<SkLayerRasterizer> detached(builder.detachRasterizer()); |
+ sk_sp<SkLayerRasterizer> oneLarger(builder.snapshot()); |
+ sk_sp<SkLayerRasterizer> detached(builder.detach()); |
// Check the counts for consistency. |
const int largerCount = LayerRasterizerTester::CountLayers(*oneLarger.get()); |
@@ -140,5 +140,5 @@ DEF_TEST(LayerRasterizer_copy, reporter) { |
DEF_TEST(LayerRasterizer_detachEmpty, reporter) { |
SkLayerRasterizer::Builder builder; |
- REPORTER_ASSERT(reporter, nullptr == builder.detachRasterizer()); |
+ REPORTER_ASSERT(reporter, nullptr == builder.detach()); |
} |