Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1563)

Unified Diff: tests/MallocPixelRefTest.cpp

Issue 2206633004: Move off SK_SUPPORT_LEGACY_DATA_FACTORIES. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Gotta catch 'em all. Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tests/MallocPixelRefTest.cpp
diff --git a/tests/MallocPixelRefTest.cpp b/tests/MallocPixelRefTest.cpp
index 2e6c07d1034faf28e39816c1b07ae3aafe09608a..adc69148b0258e32820dd22afdad505485f2c784 100644
--- a/tests/MallocPixelRefTest.cpp
+++ b/tests/MallocPixelRefTest.cpp
@@ -32,18 +32,18 @@ DEF_TEST(MallocPixelRef, reporter) {
{
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 @@ DEF_TEST(MallocPixelRef, reporter) {
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(

Powered by Google App Engine
This is Rietveld 408576698