[Webkit-unassigned] [Bug 90758] Refactoring metadata of BitmapImage.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jul 11 16:21:36 PDT 2012


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





--- Comment #11 from Kwang Yul Seo <skyul at company100.net>  2012-07-11 16:21:36 PST ---
(In reply to comment #10)
> (In reply to comment #9)
> > Yes, we can use ImageFrameData as a member instead. But then member references become too verbose. For example, m_frames[i].m_isComplete becomes m_frames[i].m_imageFrameData.m_isComplete.
> 
> We can avoid the verbosity by adding member access functions to the class, let's listen other's opinions.

If we can remove the verbosity by adding member functions, then I think it is okay to use ImageFrameData as a member in FrameData.

> 
> > Also because these two classes are used for different purposes, we didn't want to embed ImageFrameData in Bitmap's FrameData.
> > 
> > So we chose to duplicate members here.
> 
> Oh, I see. Hmm we have 3 slightly different instances of this member group: FrameData, ImageFrameData, ParallelFrameData. Did you consider to merge them somehow? Or would it increase the complexity too much and mix things that attend to different purposes?

ImageFrameData is used to pass the decoded image between ImageSoure and its clients while FrameData is used by BitmapImage to cache the decoded image.

We originally used one class for both FrameData and ImageFrameData, but it increased the complexity too much because the life cycles of these two classes were different. So we chose to use two separate classes.

However, it is okay to use ImageFrameData as a member in FrameData because FrameData is usually initialized by FrameData::setFromImageFrameData(const ImageFrameData&) and it is natural to keep a copy of ImageFrameData in FrameData.

ParallelFrameData is used to pass a segment of decoded data from the decoder thread to the main thread. Because it is used internally only in ParallelImageDecoder and its members are different (the decoded segment instead of a native image pointer), we think it is better to leave it as is.

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