From bb281f7f963ea9ae6d735ca8430396cfabaa73ca Mon Sep 17 00:00:00 2001 From: "scroggo@google.com" Date: Mon, 18 Mar 2013 21:37:39 +0000 Subject: Improvements/additions to SkImageCache/SkLazyPixelRef. SkPurgeableImageCache: New image cache that uses virtual memory to store the pixels. Combines features of SkAshmemImageCache (which has been removed) with SkPurgeableMemoryBlock, which has android and Mac versions. SkImageCache: Modified the API. pinCache now returns a status out parameter which states whether the pinned memory retained the old data. This allows allocAndPinCache to only be used for allocations. Add a new debug only interface to purge unpinned data. Updates to documentation, clarifying behavior. Changed CachedStatus to MemoryStatus SkLruImageCache: Implement the new function purgeAllUnpinnedCaches and change implementation of pinCache for the new behavior. SkLazyPixelRef: Rewrite onLockPixels to account for the new behavior of pinCache. BitmapFactoryTest: Test the new SkPurgeableImageCache. Write tests which directly test the SkImageCaches. Create a larger bitmap, since some of the SkImageCaches are designed to handle large bitmaps. bench_ and render_pictures: Consolidate lazy_decode_bitmap into one function. Allow using a flag to specify using the purgeable image cache. Clean up some #includes. Review URL: https://codereview.chromium.org/12433020 git-svn-id: http://skia.googlecode.com/svn/trunk@8207 2bbb7eff-a529-9590-31e7-b0007b416f81 --- gyp/core.gypi | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gyp/core.gypi') diff --git a/gyp/core.gypi b/gyp/core.gypi index 23a652acb8..3810334e62 100644 --- a/gyp/core.gypi +++ b/gyp/core.gypi @@ -288,6 +288,7 @@ '<(skia_include_path)/lazy/SkBitmapFactory.h', '<(skia_include_path)/lazy/SkImageCache.h', '<(skia_include_path)/lazy/SkLruImageCache.h', + '<(skia_include_path)/lazy/SkPurgeableImageCache.h', '<(skia_src_path)/lazy/SkBitmapFactory.cpp', '<(skia_src_path)/lazy/SkLazyPixelRef.h', @@ -295,6 +296,7 @@ '<(skia_src_path)/lazy/SkLruImageCache.cpp', '<(skia_src_path)/lazy/SkPurgeableMemoryBlock.h', '<(skia_src_path)/lazy/SkPurgeableMemoryBlock_common.cpp', + '<(skia_src_path)/lazy/SkPurgeableImageCache.cpp', ], } -- cgit v1.2.3