[Webkit-unassigned] [Bug 178080] [GTK][WPE] Fix review comments on WEBPImageDecoder

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Oct 17 01:30:40 PDT 2017


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

--- Comment #4 from Miguel Gomez <magomez at igalia.com> ---
> The ImageFrame which is cached by the ImageFrameCache should have its
> m_decodingStatus be one of the following values: { Invalid, Partial,
> Complete } depending on the how much data was decoded inside this
> ImageFrame::m_nativeImage.
> -- If nothing is decoded, then m_decodingStatus should be Invalid.
> -- If there is not enough data to decode the frame, then m_decodingStatus is
> Partial.
> -- If all the data is available to decode the frame then m_decodingStatus is
> Complete.
> 
> The DecodingStatus::Decoding is used outside the ImageFrame and it is always
> used for the status of the current frame:
> BitmapImage::m_currentFrameDecodingStatus whose value is one of the
> following { Invalid, Partial, Complete, Decoding }
> 
> The reason for this distinction is we cache the ImageFrame in the
> ImageFrameCache::m_frames only when the decoding finishes. So there is no
> case where the ImageFrameCache caches an ImageFrame with ImageFrame::
> m_decodingStatus equals to DecodingStatus::Decoding.
> 
> If you want to still use the DecodingStatus::Decoding when the GTK decoder
> creates its internal ImageFrames, you can can change the above assertions to
> be like this:
> 
> ASSERT_IMPLIES(!hasBackingStore(), decodingStatus !=
> DecodingStatus::Decoding);
> 
> And you can expose ImageFrame::hasBackingStore() for all platforms where it
> is going to return false for CG platforms always:
> 
> #if !USE(CG)
>     ImageBackingStore* backingStore() const { return m_backingStore ?
> m_backingStore.get() : nullptr; }
>     bool hasBackingStore() const { return backingStore(); }
> else
>     bool hasBackingStore() const { return false; }
> #endif

Thanks for the explanation Said!!
Ok, for this patch I'm going to use only Invalid, Partial and Complete with the meanings you mention. If we decide to use Decoding in the end, I'll create a new bug to change that to all the decoders and not only the WebP one.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20171017/7e383988/attachment.html>


More information about the webkit-unassigned mailing list