Darin,
Thanks for the pointers. I did make little progress.

Current plan is to find out the entire flow from a HTML page to point of
Image decode.  Do we have any documents to help us understand the classes?

I could trace till this point.

From:

void CachedImage::data(PassRefPtr<SharedBuffer> data, bool allDataReceived)

inside this function we have a call to setData

sizeAvailable = m_image->setData(m_data, allDataReceived);

Which is calling Android Implemenation of ImageSource class

void ImageSource::setData(SharedBuffer* data, bool allDataReceived)

Further down this calls Android Skia libraries which decide on SW or HW
Image Decoder.






On Thu, Mar 19, 2009 at 4:24 PM, Darin Adler <[email protected]> wrote:

> On Mar 19, 2009, at 1:51 PM, Ravi Ramachandra wrote:
>
>  I am very new to webkit. Pardon my silly question.
>> I wanted to know when and where do we decode a JPEG image file?
>>
>> For example if on a HTML page if i encounter <IMG/> tag and with that tag
>> we have a src=".http:///xxxx/some_picture.jpg";, how does webkit render
>> this?
>> It needs to decode this MIME type and i know webkit has a JPEG decoder
>> built into it, but i am unable to find a right place in code.
>>
>
> The decoder is not chosen based on the MIME type. It’s chosen based on the
> actual image data. Bitmap work in <img> tags even if the wrong type is
> given, unless the type happens to be the type of one of the non-bitmap
> images (application/pdf or image/svg+xml).
>
> The class that handles image decoding is ImageSource. For Android, you can
> look at the header ImageDecoder.h for some more details.
>
>    -- Darin
>
>
_______________________________________________
webkit-dev mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

Reply via email to