[webkit-dev] Newbie question re: raw bitmaps

Alex Danilo alex at legrope.com
Wed Dec 22 14:28:25 PST 2010

Hi All,

	Sorry to post a newbie question.

	My name's Alex Danilo, I've been doing some SVG stuff over the past
few years and now have spent the past few months looking into the SVG
implementation in WebKit.

	What I'm tyring to do is add a new image format in the engine
as an exercise.

	I am trying to add support for JPEG-XR (formerly HD-Photo) as
a new supported image format for the <image> element (and <img> in
HTML I guess too).

	Looking at the ports, code etc. this all plumbs via the Image
class, BitmapImage class, etc.

	For some ports, like CG I see that the decode is done lazily
and defers it to CG so that no intermediate bitmaps are generated.

	For JPEG-XR, I will have to unpack the ARGB32 bitmap somewhere
in memory and do a GraphicsContext drawImage() call to paint it to
the canvas.

	So my question is, is there any preferred or desirable method
to accomplish this? i.e. how should I structure the interface to the
Image class to make sure it works on all ports without creating
a dog's breakfast of it?

	All tips and pointers greatly appreciated.


More information about the webkit-dev mailing list