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

Unified Diff: tests/StreamTest.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/StreamTest.cpp
diff --git a/tests/StreamTest.cpp b/tests/StreamTest.cpp
index fe4da0f5fbcbdbb2560a94c549e34a6f18eb815e..50523ff3178ff3e471453c4cb066cd241ff752a1 100644
--- a/tests/StreamTest.cpp
+++ b/tests/StreamTest.cpp
@@ -174,7 +174,7 @@ static void TestPackedUInt(skiatest::Reporter* reporter) {
static void TestDereferencingData(SkMemoryStream* memStream) {
memStream->read(nullptr, 0);
memStream->getMemoryBase();
- SkAutoDataUnref data(memStream->copyToData());
+ sk_sp<SkData> data(memStream->copyToData());
}
static void TestNullData() {
@@ -361,7 +361,7 @@ DEF_TEST(StreamPeek_BlockMemoryStream, rep) {
dynamicMemoryWStream.write(buffer, size);
}
SkAutoTDelete<SkStreamAsset> asset(dynamicMemoryWStream.detachAsStream());
- SkAutoTUnref<SkData> expected(SkData::NewUninitialized(asset->getLength()));
+ sk_sp<SkData> expected(SkData::MakeUninitialized(asset->getLength()));
uint8_t* expectedPtr = static_cast<uint8_t*>(expected->writable_data());
valueSource.setSeed(kSeed); // reseed.
// We want the exact same same "random" string of numbers to put
@@ -370,7 +370,7 @@ DEF_TEST(StreamPeek_BlockMemoryStream, rep) {
for (size_t i = 0; i < asset->getLength(); ++i) {
expectedPtr[i] = valueSource.nextU() & 0xFF;
}
- stream_peek_test(rep, asset, expected);
+ stream_peek_test(rep, asset, expected.get());
}
namespace {

Powered by Google App Engine
This is Rietveld 408576698