[Webkit-unassigned] [Bug 26467] Cross-platform image system architecture cleanup metabug

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jun 17 08:27:24 PDT 2009


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


yong.li at torchmobile.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |staikos at kde.org




------- Comment #5 from yong.li at torchmobile.com  2009-06-17 08:27 PDT -------

We've already done this in WINCE port. We also think this can be shared by 
other platforms. But so far we haven't got ready to merge all our code.

Take a look at this file:

http://code.staikos.net/cgi-bin/gitweb.cgi?p=WebKit-CE;a=blob;f=WebCore/platform/graphics/wince/ImageFrameSink.h;h=60281851ae5ec64cfd6b701409e257339677cc28;hb=HEAD

What we've done is:

1. Define ImageFrameSink interface, which the platform-independent 
interface, but some of its methods must be implemented for specific 
platform. ImageFrameSink can support 16bit, and can also write directly to 
platform-specific image storage buffer.

2. In WINCE port, we implement ImageFrameSink with another utility class 
"SharedBitmap". The buffer that image decoder directly writes is also 
directly used to render the image.

It's very easy to implement ImageFrameSinkFoo.cpp with current RGB32Buffer.

3. We only support 16bit in 2 formats: RGB555 and RGB565, but it's 
determined by a macro switch. Images with alpha channel cannot use 16bit 
currently. Transparent GIF images with single transparent colors can also 
use 16bit if the transparent color doesn't conflict with other colors in the 
image after converting to 16bit.

4. We made changes in image decoders, and to make them work with 
ImageFrameSink and support 16bit.

5. We also support scaling huge images down to smaller size, and this is 
done on the fly of decoding, so there's no extra buffer-to-buffer scaling. 
Refer to ImageDecoder.h and ImageDecocer.cpp in our GIT repository. This 
feature is available when USE(IMAGEFRAMESINK) is true.

6. We also did some work for resource caching. We've implemented 
SharedBuffer in our way, and so that the buffer doesn't need to be flat 
Vector. Instead, it can be a series of segments. See the definition of 
OptimizedBuffer. And we make all image decoders (and other modules that uses 
text decoders) work with segmented source. This is currently only for WINCE 
& TORCHMOBILE. But we think it can be helpful for other platform, too.

7. Other things I cannot remember at this time.

We hope to get our efforts merged to upstream as much as we can, and wish
this can save your development time.

Best regards,

Yong Li

Torch Mobile, Inc.


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



More information about the webkit-unassigned mailing list