diff options
author | halcanary@google.com <halcanary@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-12-10 18:33:07 +0000 |
---|---|---|
committer | halcanary@google.com <halcanary@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-12-10 18:33:07 +0000 |
commit | bc55eec80ef376208b3c1bfc65d8dc8b672d59f0 (patch) | |
tree | a33bb8502b441562ece4247a23404ee28c95e488 /tests/CachedDecodingPixelRefTest.cpp | |
parent | c9a8a7e23de576ac91e9b34a221382f7c0e69813 (diff) |
Implement SkAshmemDiscardableMemory
- Implement ashmem-backed SkDiscardableMemory subclass:
This class in only accesible via the SkDiscardableMemory::Create()
function, which replaces the mock implementation in
SkDiscardableMemory_none.cpp
- Added SkDiscardableMemory_ashmem.cpp to the Android port of Skia
Removed SkDiscardableMemory_none.cpp from the Android port.
- Added DiscardableMemoryTest.
Still needs work.
- SkDiscardablePixelRef Bugfix:
onLockPixels() now calls SkDELETE on the SkDiscardableMemory pointer
when it fails to unlock.
- Improved documentation inside ashmem.h
BUG=
R=scroggo@google.com
Review URL: https://codereview.chromium.org/83563002
git-svn-id: http://skia.googlecode.com/svn/trunk@12608 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'tests/CachedDecodingPixelRefTest.cpp')
-rw-r--r-- | tests/CachedDecodingPixelRefTest.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/CachedDecodingPixelRefTest.cpp b/tests/CachedDecodingPixelRefTest.cpp index 6abcf3d301..1e4ab3f35d 100644 --- a/tests/CachedDecodingPixelRefTest.cpp +++ b/tests/CachedDecodingPixelRefTest.cpp @@ -300,12 +300,12 @@ DEF_TEST(DiscardableAndCachingPixelRef, reporter) { REPORTER_ASSERT(reporter, 0 == pool->getRAMUsed()); SkDiscardableMemoryPool* globalPool = SkGetGlobalDiscardableMemoryPool(); + // Only acts differently from NULL on a platform that has a + // default discardable memory implementation that differs from the + // global DM pool. CheckPixelRef(TestImageGenerator::kFailGetPixels_TestType, reporter, kSkDiscardable_PixelRefType, globalPool); CheckPixelRef(TestImageGenerator::kSucceedGetPixels_TestType, reporter, kSkDiscardable_PixelRefType, globalPool); - - // TODO(halcanary): When ashmem-backed SkDiscardableMemory lands, - // test that here (on platforms where it is availible). } //////////////////////////////////////////////////////////////////////////////// |