Index: tests/ImageGeneratorTest.cpp |
diff --git a/tests/ImageGeneratorTest.cpp b/tests/ImageGeneratorTest.cpp |
index 3d750b2c7327cc909ba78fa5911d7c711a4c4ed5..63a47e46b1b85bc68d26e3527db66c2d816bcfab 100644 |
--- a/tests/ImageGeneratorTest.cpp |
+++ b/tests/ImageGeneratorTest.cpp |
@@ -19,21 +19,21 @@ static SkImageGenerator* my_factory(SkData*) { |
static void test_imagegenerator_factory(skiatest::Reporter* reporter) { |
// just need a non-empty data to test things |
- SkAutoTUnref<SkData> data(SkData::NewWithCString("test_imagegenerator_factory")); |
+ sk_sp<SkData> data(SkData::MakeWithCString("test_imagegenerator_factory")); |
gMyFactoryWasCalled = false; |
SkImageGenerator* gen; |
REPORTER_ASSERT(reporter, !gMyFactoryWasCalled); |
- gen = SkImageGenerator::NewFromEncoded(data); |
+ gen = SkImageGenerator::NewFromEncoded(data.get()); |
REPORTER_ASSERT(reporter, nullptr == gen); |
REPORTER_ASSERT(reporter, !gMyFactoryWasCalled); |
// Test is racy, in that it hopes no other thread is changing this global... |
SkGraphics::ImageGeneratorFromEncodedFactory prev = |
SkGraphics::SetImageGeneratorFromEncodedFactory(my_factory); |
- gen = SkImageGenerator::NewFromEncoded(data); |
+ gen = SkImageGenerator::NewFromEncoded(data.get()); |
REPORTER_ASSERT(reporter, nullptr == gen); |
REPORTER_ASSERT(reporter, gMyFactoryWasCalled); |
SkGraphics::SetImageGeneratorFromEncodedFactory(prev); |