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

Unified Diff: tests/StreamTest.cpp

Issue 849103004: Make SkStream *not* ref counted. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Rebase, just in case. Created 5 years, 11 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
« no previous file with comments | « tests/SerializationTest.cpp ('k') | tools/dump_record.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/StreamTest.cpp
diff --git a/tests/StreamTest.cpp b/tests/StreamTest.cpp
index ab0af14088971deebec3ef0296a6112a16a38bbc..ff22ecf5548799cdf7c09a2ee0129167417e4224 100644
--- a/tests/StreamTest.cpp
+++ b/tests/StreamTest.cpp
@@ -58,7 +58,7 @@ static void test_filestreams(skiatest::Reporter* reporter, const char* tmpDir) {
REPORTER_ASSERT(reporter, stream.isValid());
test_loop_stream(reporter, &stream, s, 26, 100);
- SkAutoTUnref<SkStreamAsset> stream2(stream.duplicate());
+ SkAutoTDelete<SkStreamAsset> stream2(stream.duplicate());
test_loop_stream(reporter, stream2.get(), s, 26, 100);
}
@@ -68,7 +68,7 @@ static void test_filestreams(skiatest::Reporter* reporter, const char* tmpDir) {
REPORTER_ASSERT(reporter, stream.isValid());
test_loop_stream(reporter, &stream, s, 26, 100);
- SkAutoTUnref<SkStreamAsset> stream2(stream.duplicate());
+ SkAutoTDelete<SkStreamAsset> stream2(stream.duplicate());
test_loop_stream(reporter, stream2.get(), s, 26, 100);
}
}
@@ -91,15 +91,15 @@ static void TestWStream(skiatest::Reporter* reporter) {
}
{
- SkAutoTUnref<SkStreamAsset> stream(ds.detachAsStream());
+ SkAutoTDelete<SkStreamAsset> stream(ds.detachAsStream());
REPORTER_ASSERT(reporter, 100 * 26 == stream->getLength());
REPORTER_ASSERT(reporter, ds.getOffset() == 0);
test_loop_stream(reporter, stream.get(), s, 26, 100);
- SkAutoTUnref<SkStreamAsset> stream2(stream->duplicate());
+ SkAutoTDelete<SkStreamAsset> stream2(stream->duplicate());
test_loop_stream(reporter, stream2.get(), s, 26, 100);
- SkAutoTUnref<SkStreamAsset> stream3(stream->fork());
+ SkAutoTDelete<SkStreamAsset> stream3(stream->fork());
REPORTER_ASSERT(reporter, stream3->isAtEnd());
char tmp;
size_t bytes = stream->read(&tmp, 1);
@@ -121,11 +121,11 @@ static void TestWStream(skiatest::Reporter* reporter) {
{
// Test that this works after a copyToData.
- SkAutoTUnref<SkStreamAsset> stream(ds.detachAsStream());
+ SkAutoTDelete<SkStreamAsset> stream(ds.detachAsStream());
REPORTER_ASSERT(reporter, ds.getOffset() == 0);
test_loop_stream(reporter, stream.get(), s, 26, 100);
- SkAutoTUnref<SkStreamAsset> stream2(stream->duplicate());
+ SkAutoTDelete<SkStreamAsset> stream2(stream->duplicate());
test_loop_stream(reporter, stream2.get(), s, 26, 100);
}
delete[] dst;
« no previous file with comments | « tests/SerializationTest.cpp ('k') | tools/dump_record.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698