[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 15 09:20:30 PST 2013


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





--- Comment #7 from Min Qin <qinmin at chromium.org>  2013-01-15 09:22:16 PST ---
(In reply to comment #5)
> (From update of attachment 182657 [details])
> Isn't there a way to remove all these modes and stuff by
> 0) always delegating allocator up to skia, e.g. instead of skia::DiscardableMemoryAllocator, use skia::MemoryAllocator

Not all the SkPixelRef will use DiscardableMemory, we have to pass a flag from webkit to skia. In thise case, we use MemoryAllocator as the flag. If we pass a flag to MemoryAllocator, then we have to change all the third_party/skia code.

> 1) basically making the cache size a webkit preference that we set up in the embedder, and
> 2) making the lazy pixel ref have a mode saying "are you purged"? eg asume all lazy refs can be purged/lost then just deal with it? The thing is, other than the static cast here, and the size set differently, there's nothign much special webkit side about this...

Lazy_pixel_ref has no idea whether the memory was purged. Only DiscardablePixelRef knows it. LazyPixelRef was created as a place holder, so it doesn't know the underneath implementation. However, the LazyDecodingPixelRef::prepareToDecode() is already doing sth. similar to what you are saying.

-- 
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