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

Unified Diff: tests/ClipCacheTest.cpp

Issue 382523002: Revert "Remove ability for Release code to call getRefCnt() or getWeakRefCnt()." (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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/core/SkImageFilter.cpp ('k') | tests/ImageFilterTest.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 c6f33c7eedd308d5c1b8128bd9fdf41079897bf3..77f0137d5a58996b3d1f97c48484c4f45b7ceb19 100644
--- a/tests/ClipCacheTest.cpp
+++ b/tests/ClipCacheTest.cpp
@@ -6,7 +6,6 @@
*/
#include "Test.h"
-#include "RefCntIs.h"
// This is a GR test
#if SK_SUPPORT_GPU
#include "../../src/gpu/GrClipMaskManager.h"
@@ -165,14 +164,14 @@ static void test_cache(skiatest::Reporter* reporter, GrContext* context) {
// check that the set took
check_state(reporter, cache, clip1, texture1, bound1);
- REPORTER_ASSERT(reporter, !RefCntIs(*texture1, 0));
+ 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, !RefCntIs(*texture1, 0));
+ REPORTER_ASSERT(reporter, texture1->getRefCnt());
// modify the new state
SkIRect bound2;
@@ -190,8 +189,8 @@ static void test_cache(skiatest::Reporter* reporter, GrContext* context) {
// check that the changes took
check_state(reporter, cache, clip2, texture2, bound2);
- REPORTER_ASSERT(reporter, !RefCntIs(*texture1, 0));
- REPORTER_ASSERT(reporter, !RefCntIs(*texture2, 0));
+ REPORTER_ASSERT(reporter, texture1->getRefCnt());
+ REPORTER_ASSERT(reporter, texture2->getRefCnt());
// check to make sure canReuse works
REPORTER_ASSERT(reporter, cache.canReuse(clip2.getTopmostGenID(), bound2));
@@ -202,7 +201,7 @@ 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, !RefCntIs(*texture1, 0));
+ REPORTER_ASSERT(reporter, texture1->getRefCnt());
// manually clear the state
cache.reset();
« no previous file with comments | « src/core/SkImageFilter.cpp ('k') | tests/ImageFilterTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698