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

Unified Diff: tests/CodexTest.cpp

Issue 1809733002: detach -> release (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: (C) Created 4 years, 9 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/CachedDecodingPixelRefTest.cpp ('k') | tests/ColorSpaceTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/CodexTest.cpp
diff --git a/tests/CodexTest.cpp b/tests/CodexTest.cpp
index 907fd7db9bb333e4fec829b65c41d3b153c6c922..be25dc35b545c2031a92dfed2070ed7afeba147b 100644
--- a/tests/CodexTest.cpp
+++ b/tests/CodexTest.cpp
@@ -171,7 +171,7 @@ static void check(skiatest::Reporter* r,
SkAutoTUnref<SkData> data((SkData::NewFromStream(stream, 2 * size / 3)));
codec.reset(SkCodec::NewFromData(data));
} else {
- codec.reset(SkCodec::NewFromStream(stream.detach()));
+ codec.reset(SkCodec::NewFromStream(stream.release()));
}
if (!codec) {
ERRORF(r, "Unable to decode '%s'", path);
@@ -300,7 +300,7 @@ static void check(skiatest::Reporter* r,
SkAutoTUnref<SkData> data((SkData::NewFromStream(stream, 2 * size / 3)));
androidCodec.reset(SkAndroidCodec::NewFromData(data));
} else {
- androidCodec.reset(SkAndroidCodec::NewFromStream(stream.detach()));
+ androidCodec.reset(SkAndroidCodec::NewFromStream(stream.release()));
}
if (!androidCodec) {
ERRORF(r, "Unable to decode '%s'", path);
@@ -412,7 +412,7 @@ DEF_TEST(Codec_stripes, r) {
SkDebugf("Missing resource '%s'\n", path);
}
- SkAutoTDelete<SkCodec> codec(SkCodec::NewFromStream(stream.detach()));
+ SkAutoTDelete<SkCodec> codec(SkCodec::NewFromStream(stream.release()));
REPORTER_ASSERT(r, codec);
if (!codec) {
@@ -545,7 +545,7 @@ static void test_dimensions(skiatest::Reporter* r, const char path[]) {
SkDebugf("Missing resource '%s'\n", path);
return;
}
- SkAutoTDelete<SkAndroidCodec> codec(SkAndroidCodec::NewFromStream(stream.detach()));
+ SkAutoTDelete<SkAndroidCodec> codec(SkAndroidCodec::NewFromStream(stream.release()));
if (!codec) {
ERRORF(r, "Unable to create codec '%s'", path);
return;
@@ -610,7 +610,7 @@ static void test_invalid(skiatest::Reporter* r, const char path[]) {
SkDebugf("Missing resource '%s'\n", path);
return;
}
- SkAutoTDelete<SkCodec> codec(SkCodec::NewFromStream(stream.detach()));
+ SkAutoTDelete<SkCodec> codec(SkCodec::NewFromStream(stream.release()));
REPORTER_ASSERT(r, nullptr == codec);
}
@@ -636,7 +636,7 @@ static void test_invalid_parameters(skiatest::Reporter* r, const char path[]) {
SkDebugf("Missing resource '%s'\n", path);
return;
}
- SkAutoTDelete<SkCodec> decoder(SkCodec::NewFromStream(stream.detach()));
+ SkAutoTDelete<SkCodec> decoder(SkCodec::NewFromStream(stream.release()));
// This should return kSuccess because kIndex8 is supported.
SkPMColor colorStorage[256];
@@ -954,7 +954,7 @@ DEF_TEST(Codec_wbmp_max_size, r) {
0x83, 0xFF, 0x7F, // W: 65535
0x83, 0xFF, 0x7F }; // H: 65535
SkAutoTDelete<SkStream> stream(new SkMemoryStream(maxSizeWbmp, sizeof(maxSizeWbmp), false));
- SkAutoTDelete<SkCodec> codec(SkCodec::NewFromStream(stream.detach()));
+ SkAutoTDelete<SkCodec> codec(SkCodec::NewFromStream(stream.release()));
REPORTER_ASSERT(r, codec);
if (!codec) return;
@@ -968,7 +968,7 @@ DEF_TEST(Codec_wbmp_max_size, r) {
0x84, 0x80, 0x00, // W: 65536
0x84, 0x80, 0x00 }; // H: 65536
stream.reset(new SkMemoryStream(tooBigWbmp, sizeof(tooBigWbmp), false));
- codec.reset(SkCodec::NewFromStream(stream.detach()));
+ codec.reset(SkCodec::NewFromStream(stream.release()));
REPORTER_ASSERT(r, !codec);
}
« no previous file with comments | « tests/CachedDecodingPixelRefTest.cpp ('k') | tests/ColorSpaceTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698