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

Unified Diff: tests/Writer32Test.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/Writer32Test.cpp
diff --git a/tests/Writer32Test.cpp b/tests/Writer32Test.cpp
index ac932e1d297efa6328c8ef4b97d69a41175da76c..3eab94cd2dd3d0403faec92a796bab3240799ecb 100644
--- a/tests/Writer32Test.cpp
+++ b/tests/Writer32Test.cpp
@@ -267,13 +267,13 @@ DEF_TEST(Writer32_misc, reporter) {
DEF_TEST(Writer32_data, reporter) {
const char* str = "0123456789";
- SkAutoTUnref<SkData> data0(SkData::NewWithCString(str));
- SkAutoTUnref<SkData> data1(SkData::NewEmpty());
+ sk_sp<SkData> data0(SkData::MakeWithCString(str));
+ sk_sp<SkData> data1(SkData::MakeEmpty());
const size_t sizes[] = {
SkWriter32::WriteDataSize(nullptr),
- SkWriter32::WriteDataSize(data0),
- SkWriter32::WriteDataSize(data1),
+ SkWriter32::WriteDataSize(data0.get()),
+ SkWriter32::WriteDataSize(data1.get()),
};
SkSWriter32<1000> writer;
@@ -283,11 +283,11 @@ DEF_TEST(Writer32_data, reporter) {
sizeWritten += sizes[0];
REPORTER_ASSERT(reporter, sizeWritten == writer.bytesWritten());
- writer.writeData(data0);
+ writer.writeData(data0.get());
sizeWritten += sizes[1];
REPORTER_ASSERT(reporter, sizeWritten == writer.bytesWritten());
- writer.writeData(data1);
+ writer.writeData(data1.get());
sizeWritten += sizes[2];
REPORTER_ASSERT(reporter, sizeWritten == writer.bytesWritten());

Powered by Google App Engine
This is Rietveld 408576698