skia2/include/images
scroggo@google.com f8d7d27313 Create SkLazyPixelRef which performs lazy decoding.
The new pixel ref behaves similarly to SkImageRef, with some key differences:
It does not depend on the images project.
It requires an SkImageCache, which handles allocation and caching of the pixel
memory.
It takes a function signature for decoding which decodes into already allocated
pixel memory rather than into an SkBitmap.

Add two implementations of SkImageCache: SkLruImageCache and SkAshmemImageCache.

Replace SkSerializationHelpers::DecodeBitmap with SkPicture::InstallPixelRefProc,
and update sites that referenced it.

SkBitmapFactory now sets the pixel ref to a new object of the new
class SkLazyPixelRef, provided it has an SkImageCache for caching.

Provide an option to do lazy decodes in render_pictures and bench_pictures.

SkPicture:
Eliminate the default parameters in the constructor.
If a proc for decoding bitmaps is installed, use it to decode any encoded
data in subpictures.
When parsing deserializing subpictures, check for success.
When serializing subpictures, pass the picture's bitmap encoder to the
subpicture's call to serialize.

Update BitmapFactoryTest to test its new behavior.

BUG=https://code.google.com/p/skia/issues/detail?id=1008
BUG=https://code.google.com/p/skia/issues/detail?id=1009

Review URL: https://codereview.appspot.com/7060052

git-svn-id: http://skia.googlecode.com/svn/trunk@7835 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-22 21:38:35 +00:00
..
SkImageDecoder.h Create SkLazyPixelRef which performs lazy decoding. 2013-02-22 21:38:35 +00:00
SkImageEncoder.h Extract transform_scanline_XXXX functions into transform_scanline.h for code-sharing 2012-11-16 18:44:18 +00:00
SkImageRef_GlobalPool.h Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/) 2012-08-23 18:09:54 +00:00
SkImageRef.h Fix android errors when unflattening an SkImageRef_ashmem object. 2013-02-01 15:57:13 +00:00
SkImages.h Add the ability to provide function pointers to SkPicture serialization 2012-10-04 21:46:08 +00:00
SkJpegUtility.h Automatic update of all copyright notices to reflect new license terms. 2011-07-28 14:26:00 +00:00
SkMovie.h Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/) 2012-08-23 18:09:54 +00:00
SkPageFlipper.h Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00