[Webkit-unassigned] [Bug 90443] New: Prepare for parallel image decoder.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jul 3 03:40:27 PDT 2012


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

           Summary: Prepare for parallel image decoder.
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: Images
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: luxtella at company100.net


The key point of this patch is to change how BitmapImage uses ImageSource.

Originally, BitmapImage retrieves the frame data from ImageSource by calling the following methods:
- NativeImagePtr createFrameAtIndex(size_t);
- float frameDurationAtIndex(size_t);
- bool frameHasAlphaAtIndex(size_t);
- bool frameIsCompleteAtIndex(size_t);
- ImageOrientation orientationAtIndex(size_t) const;

Upon each method call, ImageSource synchronously decodes the image and returns the requested information.
Because all the methods above are inherently synchronous, it is not easy to make them parallel.

To implement parallel image decoders, these methods must be asynchronous. So I merged all these methods into a single method, requestFrameAtIndex(size_t), which requests all the frame data at once.
Note that this method has no return value.

Instead, BitmapImage now implements ImageSourceObserver and passes itself to ImageSource constructor.
Once image decoding is finished or cached image is available, ImageSource notifies BitmapImage via
ImageSourceObserver::didReceiveImageFrameData(size_t, const ImageFrameData&). ImageFrameData contains all the frame data including frame, duration, isAlpha, isComplete and orientation.

-- 
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