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

Unified Diff: tests/ClipCacheTest.cpp

Issue 392333008: Make GrCacheable implement its own ref counting. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: remove extra blank line Created 6 years, 5 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/GrTexture.cpp ('k') | tests/ReadWriteAlphaTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/ClipCacheTest.cpp
diff --git a/tests/ClipCacheTest.cpp b/tests/ClipCacheTest.cpp
index 77f0137d5a58996b3d1f97c48484c4f45b7ceb19..d9f3b578b8aed63fa4bb41036b438db24480dbc7 100644
--- a/tests/ClipCacheTest.cpp
+++ b/tests/ClipCacheTest.cpp
@@ -57,7 +57,7 @@ static void test_clip_bounds(skiatest::Reporter* reporter, GrContext* context) {
return;
}
- SkAutoUnref au(texture);
+ SkAutoTUnref<GrTexture> au(texture);
SkIRect intScreen = SkIRect::MakeWH(kXSize, kYSize);
SkRect screen;
@@ -164,14 +164,12 @@ static void test_cache(skiatest::Reporter* reporter, GrContext* context) {
// check that the set took
check_state(reporter, cache, clip1, texture1, bound1);
- REPORTER_ASSERT(reporter, texture1->getRefCnt());
// push the state
cache.push();
// verify that the pushed state is initially empty
check_empty_state(reporter, cache);
- REPORTER_ASSERT(reporter, texture1->getRefCnt());
// modify the new state
SkIRect bound2;
@@ -189,8 +187,6 @@ static void test_cache(skiatest::Reporter* reporter, GrContext* context) {
// check that the changes took
check_state(reporter, cache, clip2, texture2, bound2);
- REPORTER_ASSERT(reporter, texture1->getRefCnt());
- REPORTER_ASSERT(reporter, texture2->getRefCnt());
// check to make sure canReuse works
REPORTER_ASSERT(reporter, cache.canReuse(clip2.getTopmostGenID(), bound2));
@@ -201,7 +197,6 @@ static void test_cache(skiatest::Reporter* reporter, GrContext* context) {
// verify that the old state is restored
check_state(reporter, cache, clip1, texture1, bound1);
- REPORTER_ASSERT(reporter, texture1->getRefCnt());
// manually clear the state
cache.reset();
« no previous file with comments | « src/gpu/GrTexture.cpp ('k') | tests/ReadWriteAlphaTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698