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

Unified Diff: tests/ResourceCacheTest.cpp

Issue 1262623008: Revert of Fix SkData leaks at GrResourceKey::setCustomData() call sites. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 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
« no previous file with comments | « src/gpu/GrTessellatingPathRenderer.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/ResourceCacheTest.cpp
diff --git a/tests/ResourceCacheTest.cpp b/tests/ResourceCacheTest.cpp
index a4acab86a19a968fa97a229602420cfcfec0301a..65b7b7ca2de630613aedd57873427d470ffa7562 100644
--- a/tests/ResourceCacheTest.cpp
+++ b/tests/ResourceCacheTest.cpp
@@ -851,8 +851,7 @@
make_unique_key<0>(&key2, 0);
SkAutoTUnref<TestResource> d(SkNEW_ARGS(TestResource, (context->getGpu())));
int foo = 4132;
- SkAutoTUnref<SkData> data(SkData::NewWithCopy(&foo, sizeof(foo)));
- key2.setCustomData(data.get());
+ key2.setCustomData(SkData::NewWithCopy(&foo, sizeof(foo)));
d->resourcePriv().setUniqueKey(key2);
}
@@ -1241,8 +1240,7 @@
static void test_custom_data(skiatest::Reporter* reporter) {
GrUniqueKey key1, key2;
int foo = 4132;
- SkAutoTUnref<SkData> data(SkData::NewWithCopy(&foo, sizeof(foo)));
- key1.setCustomData(data.get());
+ key1.setCustomData(SkData::NewWithCopy(&foo, sizeof(foo)));
REPORTER_ASSERT(reporter, *(int*) key1.getCustomData()->data() == 4132);
REPORTER_ASSERT(reporter, key2.getCustomData() == nullptr);
« no previous file with comments | « src/gpu/GrTessellatingPathRenderer.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698