[Webkit-unassigned] [Bug 90375] Parallel image decoders

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jul 31 11:39:34 PDT 2012


--- Comment #47 from Hin-Chung Lam <hclam at google.com>  2012-07-31 11:39:31 PST ---
> I think making most metadata functions protected / internal to BitmapImage is the most appropriate solution.
> I also think we should remove the explicit metadata query methods when implementing parallel image decoders.
> There may be two approaches to do this.

Agreed. Since we're doing this (asynchronous image decoding / parallel image decoding) we should do the refactoring to best fit the purpose.

> 1. Remove all metadata query methods and rename BitmapImage::nativeImageForCurrentFrame to BitmapImage::currnetFrame, and make the function return the current frame struct.
> 2. Remove all metadata query methods and call platform specific metadata query functions using nativeImagePtr.
> Both causes a big refactoring. So, I postponed this refactoring.
> I appreciate you are doing this refactoring.

I'm going for route (2).

My goal is to remove metadata queries from Image/BitmapImage for all non-CG ports. Since CG uses their own ImageSource and image decoders we should keep those metadata queries intact.

Removing currentFrameHasAlpha/frameHasAlphaAtIndex is straightforward for Skia ports. Generally this is ImageDecoder already sets this information to ImageFrame::setHasAlpha and ultimately set to the platform nativeImagePtr, so this information should well be in nativeImagePtr.

The real tricky part is the combined use of currentFrameHasAlpha and frameHasAlphaAtIndex with GraphicsContext3D::extractImageData. This is used in texmap where an image is represented by an array of bytes and not nativeImagePtr. Fortunately there's very little use of this and can be fixed.

Once currentFrameHasAlpha and frameHasAlphaAtIndex is unplugged then frameDurationAtIndex and frameIsCompleteAtIndex are both internal to BitmapImage and only meaningful to GIF, fixing that to work with asynchronous image decoding will have to do with refactoring the GIF image decoder. Again this is doable.

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