DescriptionDon't cache any SkBitmaps in DeferredImageDecoder
DeferredImageDecoder used to cache SkBitmaps for deferred decoded
images. This caused SkPixelRef to be referenced and memory are held by
Skia's image cache.
Instead DeferredImageDecoder shouldn't cache any SkBitmap. This is now
done entirely in BitmapImage. BitmapImage already has a policy when
an image exceeds 5MB it will clears its own cache. This will help to
free up memory for a large animated image.
DeferredImageDecoder used to mimic the ImageDecoder interface. Since
ImageSource uses this type directly there is no need for frameBufferAtIndex().
Instead DeferredImageDecoder simply returns a new NativeImageSkia.
Re-redecoding for progressive images and animations will be controlled
by BitmapImage and there is no need to cache.
Some minor cleanups are included:
* Remove unused methods from ImageSource and users.
* Move definition of animation types to ImageDecoder.h
Eventually ImageSource can be folded into BitmapImage or
DeferredImageDecoder.
BUG=429418
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=191876
Patch Set 1 #Patch Set 2 : fixed test too #Patch Set 3 : fixed test #
Total comments: 1
Patch Set 4 : ImageAnimation.h #
Total comments: 1
Patch Set 5 : fixed comments #Patch Set 6 : merged #Patch Set 7 : done now #Messages
Total messages: 15 (6 generated)
|