Move off SK_SUPPORT_LEGACY_DATA_FACTORIES.
This moves Skia code off of SK_SUPPORT_LEGACY_DATA_FACTORIES.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2206633004
Review-Url: https://codereview.chromium.org/2206633004
diff --git a/tests/MallocPixelRefTest.cpp b/tests/MallocPixelRefTest.cpp
index 2e6c07d..adc6914 100644
--- a/tests/MallocPixelRefTest.cpp
+++ b/tests/MallocPixelRefTest.cpp
@@ -32,18 +32,18 @@
{
size_t rowBytes = info.minRowBytes() - 1;
size_t size = info.getSafeSize(rowBytes);
- SkAutoDataUnref data(SkData::NewUninitialized(size));
+ sk_sp<SkData> data(SkData::MakeUninitialized(size));
SkAutoTUnref<SkMallocPixelRef> pr(
- SkMallocPixelRef::NewWithData(info, rowBytes, nullptr, data));
+ SkMallocPixelRef::NewWithData(info, rowBytes, nullptr, data.get()));
// rowbytes too small.
REPORTER_ASSERT(reporter, nullptr == pr.get());
}
{
size_t rowBytes = info.minRowBytes() + 2;
size_t size = info.getSafeSize(rowBytes) - 1;
- SkAutoDataUnref data(SkData::NewUninitialized(size));
+ sk_sp<SkData> data(SkData::MakeUninitialized(size));
SkAutoTUnref<SkMallocPixelRef> pr(
- SkMallocPixelRef::NewWithData(info, rowBytes, nullptr, data));
+ SkMallocPixelRef::NewWithData(info, rowBytes, nullptr, data.get()));
// data too small.
REPORTER_ASSERT(reporter, nullptr == pr.get());
}
@@ -93,7 +93,7 @@
REPORTER_ASSERT(reporter, addr == pr->pixels());
}
{
- SkAutoDataUnref data(SkData::NewUninitialized(size));
+ sk_sp<SkData> data(SkData::MakeUninitialized(size));
SkData* dataPtr = data.get();
REPORTER_ASSERT(reporter, dataPtr->unique());
SkAutoTUnref<SkMallocPixelRef> pr(