aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2014-09-30 06:02:23 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-09-30 06:02:23 -0700
commit3d398c876440deaab39bbf2a9b881c337e6dc8d4 (patch)
treeb38c23d2b6742c9d515dd2b19a1cf8fca49a16f0 /tests
parentc0eb9b9818462471f5fc1c47fa549c6052d8bbae (diff)
GrResourceCache2 manages scratch texture.
BUG=skia: R=robertphillips@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/608883003
Diffstat (limited to 'tests')
-rw-r--r--tests/ResourceCacheTest.cpp31
1 files changed, 0 insertions, 31 deletions
diff --git a/tests/ResourceCacheTest.cpp b/tests/ResourceCacheTest.cpp
index f9f94d1b27..d62d09d933 100644
--- a/tests/ResourceCacheTest.cpp
+++ b/tests/ResourceCacheTest.cpp
@@ -247,37 +247,6 @@ static void test_resource_size_changed(skiatest::Reporter* reporter,
REPORTER_ASSERT(reporter, 201 == cache.getCachedResourceBytes());
REPORTER_ASSERT(reporter, 1 == cache.getCachedResourceCount());
}
-
- // Test changing the size of an exclusively-held resource.
- {
- GrResourceCache cache(2, 300);
-
- TestResource* a = new TestResource(context->getGpu(), 100);
- cache.addResource(key1, a);
- cache.makeExclusive(a->getCacheEntry());
-
- TestResource* b = new TestResource(context->getGpu(), 100);
- cache.addResource(key2, b);
- b->unref();
-
- REPORTER_ASSERT(reporter, 200 == cache.getCachedResourceBytes());
- REPORTER_ASSERT(reporter, 2 == cache.getCachedResourceCount());
- REPORTER_ASSERT(reporter, NULL == cache.find(key1));
-
- a->setSize(200);
-
- REPORTER_ASSERT(reporter, 300 == cache.getCachedResourceBytes());
- REPORTER_ASSERT(reporter, 2 == cache.getCachedResourceCount());
- // Internal resource cache validation will test the detached size (debug mode only).
-
- cache.makeNonExclusive(a->getCacheEntry());
- a->unref();
-
- REPORTER_ASSERT(reporter, 300 == cache.getCachedResourceBytes());
- REPORTER_ASSERT(reporter, 2 == cache.getCachedResourceCount());
- REPORTER_ASSERT(reporter, cache.find(key1));
- // Internal resource cache validation will test the detached size (debug mode only).
- }
}
////////////////////////////////////////////////////////////////////////////////