diff options
author | mtklein@google.com <mtklein@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-08-12 14:51:25 +0000 |
---|---|---|
committer | mtklein@google.com <mtklein@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-08-12 14:51:25 +0000 |
commit | c9ab2b7dd8411f8a78654b237c69a5886567dfec (patch) | |
tree | 3260584eecd429828cf923cec2e9393f0c9b7857 /tests/ImageCacheTest.cpp | |
parent | fb4a68de439b59fd71cea47ca1fd4e9f58844d2a (diff) |
SkTDynamicHash
- add validate()
- make add() and remove() strict
- fill in maybeShrink()
- make grow and shrink thresholds configurable.
- fix issue where we were getting filled with deleted items - we need to count them as occupied when determining if we should grow
BUG=
R=reed@google.com
Review URL: https://codereview.chromium.org/22571010
git-svn-id: http://skia.googlecode.com/svn/trunk@10677 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'tests/ImageCacheTest.cpp')
-rw-r--r-- | tests/ImageCacheTest.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/ImageCacheTest.cpp b/tests/ImageCacheTest.cpp index 947ece1e21..877591acc7 100644 --- a/tests/ImageCacheTest.cpp +++ b/tests/ImageCacheTest.cpp @@ -48,14 +48,14 @@ static void TestImageCache(skiatest::Reporter* reporter) { // stress test, should trigger purges for (size_t i = 0; i < COUNT * 100; ++i) { + scale += 1; + SkBitmap tmp; make_bm(&tmp, DIM, DIM); id = cache.addAndLock(bm[0], scale, scale, tmp); REPORTER_ASSERT(reporter, NULL != id); cache.unlock(id); - - scale += 1; } cache.setByteLimit(0); |