Bug 93465

Summary: Set m_isComplete to true in BitmapImage(NativeImagePtr, ImageObserver*).
Product: WebKit Reporter: Dongseong Hwang <dongseong.hwang>
Component: ImagesAssignee: Nobody <webkit-unassigned>
Status: UNCONFIRMED ---    
Severity: Normal CC: hclam, nick, noam, skyul, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 90375    
Attachments:
Description Flags
Patch none

Description Dongseong Hwang 2012-08-08 05:02:25 PDT
This constructor creates a BitmapImage from a platform specific NativeImagePtr.
It sets m_frame of the first frame to the given NativeImagePtr.
The BitmapImage created does not need decoding because decoding is already done.
So, it is proper to set m_isComplete to true. Currently, only OpenVG
port sets m_isComplete to true.

This change is needed for parallel image decoders. Currently,
BitmapImage checks only m_frame in order to determine whether decoding
is needed or not. But after parallel image decoders are landed,
BitmapImage also needs to check m_isComplete. If m_isComplete is false,
BitmapImage will try to decode again, and it can't actually decode
because the BitmapImage created from a NativeImagePtr does not have
encoded data.
Comment 1 Dongseong Hwang 2012-08-08 05:04:37 PDT
Created attachment 157185 [details]
Patch
Comment 2 Hin-Chung Lam 2012-08-08 20:15:07 PDT
I suggest we take down the review flag at the moment. It is unclear why we need this because refactoring for ImageSource and BitmapImage hasn't landed yet. We'll also need test for this change.
Comment 3 Dongseong Hwang 2012-08-08 22:01:52 PDT
(In reply to comment #2)
> I suggest we take down the review flag at the moment. It is unclear why we need this because refactoring for ImageSource and BitmapImage hasn't landed yet. We'll also need test for this change.

I came close to turn on the review flag of parallel image decoders and RetainedModeBitmapImage. I agreed on you.