[Webkit-unassigned] [Bug 106842] adding support for DiscardablePixelRef for caching lazily decoded images

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jan 22 15:59:46 PST 2013


https://bugs.webkit.org/show_bug.cgi?id=106842





--- Comment #35 from Min Qin <qinmin at chromium.org>  2013-01-22 16:01:38 PST ---
I don't think we can easily use that class.
1. It is not threadsafe. It uses a mutex ring which is not threadsafe.
2. It uses SkImageDecoder, not sure how much effort we will have to maintain that later on.
3. For a single image, we can have multiple cache entries(different resolutions, rects.) And we have two PixelRefs. One placeholder(LazyDecodingPixelRef), one stores the pixel(DiscardablePixelRef). Decode() is called on a single placeholder, while storage is on different DiscardablePixelRefs. So there is a 1:M relationship here.

I think we can add the allocation size limit here, but I am not sure whether we should have it in this patch. Maybe a follow up one.

(In reply to comment #33)
> (In reply to comment #30)
> > Has anyone looked at http://code.google.com/p/skia/source/browse/trunk/src/ports/SkImageRef_ashmem.h / http://code.google.com/p/skia/source/browse/trunk/src/ports/SkImageRef_ashmem.cpp ?  Can we use that directly?  If not, can we look at how it's implemented and learn anything?  For instance, it seems to always round the allocation size up to the next page size.
> 
> I'd really like an answer to ^^

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list