[webkit-help] Background PNG decoding in WebKit

Zoltan Horvath zoltan at webkit.org
Wed Oct 12 03:01:48 PDT 2011


On Wed, 12 Oct 2011 03:39:19 +0200, Stephen Mattison  
<stephenmattison at gmail.com> wrote:

> The problem I'm having is that it does not appear that PNGs are decoded  
> in
> the background in Webkit on iOS. Right now what I have is essentially a
> ScrollView. I have a div the size of the viewport with another div that
> scales with the content. I am scrolling the content div using a  
> transition
> and translate3d to achieve GPU acceleration. The scrolling looks great.
> However the content is composed of images and they cannot all fit in  
> memory
> at once so I am loading them on demand. The problem arises when I set the
> background-image css property to a locally stored PNG image and then  
> attempt
> to scroll. I get a noticeable delay/jerkiness/hiccup as the image is
> decoded. Is there something I should be doing differently?

Hey!

WebKit is decoding images in the mainthread when there is new chunk of  
image and it hasn't decoded yet, thus it is imaginable that it blocks your  
main thread for 'longer' time.

I have a sketchy implementation for Qt to support imagedecoding in a  
(currently 1) separate thread.
If you are interested check: https://bugs.webkit.org/show_bug.cgi?id=69515

Regards,
Zoltan


More information about the webkit-help mailing list