Commit Graph

7 Commits

Author SHA1 Message Date
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
epoger@google.com
ddd8fa8f45 Remove SkListWidget.cpp, which has not been compiled for 18 months
(Our very first gyp file from https://code.google.com/p/skia/source/detail?spec=svn955&r=955 already had it turned off)
Review URL: https://codereview.appspot.com/6566049

git-svn-id: http://skia.googlecode.com/svn/trunk@5668 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-09-25 18:24:41 +00:00
epoger@google.com
4e2d4ff99d Delete SkListView.cpp, which has been #ifdef'ed out for 4+ years
Review URL: https://codereview.appspot.com/6550062

git-svn-id: http://skia.googlecode.com/svn/trunk@5667 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-09-25 17:48:30 +00:00
bungeman@google.com
37946b5b2e Move animated view headers to correct directory.
git-svn-id: http://skia.googlecode.com/svn/trunk@4524 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-10 21:54:31 +00:00
bungeman@google.com
5a64e58ebb Revert 3538.
git-svn-id: http://skia.googlecode.com/svn/trunk@3539 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-03-29 14:51:56 +00:00
bungeman@google.com
29b63dc863 Correct dependencies in gyp files.
http://codereview.appspot.com/5934044/


git-svn-id: http://skia.googlecode.com/svn/trunk@3538 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-03-29 14:28:59 +00:00
bungeman@google.com
5e41b37b23 Remove circular dependency of views and animator.
http://codereview.appspot.com/5874056/


git-svn-id: http://skia.googlecode.com/svn/trunk@3473 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-03-23 14:11:43 +00:00