[webkit-reviews] review granted: [Bug 216104] [CG] Cache the last status of the image encoded data : [Attachment 408470] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Sep 11 00:07:48 PDT 2020


youenn fablet <youennf at gmail.com> has granted Said Abou-Hallawa
<sabouhallawa at apple.com>'s request for review:
Bug 216104: [CG] Cache the last status of the image encoded data
https://bugs.webkit.org/show_bug.cgi?id=216104

Attachment 408470: Patch

https://bugs.webkit.org/attachment.cgi?id=408470&action=review




--- Comment #8 from youenn fablet <youennf at gmail.com> ---
Comment on attachment 408470
  --> https://bugs.webkit.org/attachment.cgi?id=408470
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=408470&action=review

> Source/WebCore/platform/graphics/cg/ImageDecoderCG.cpp:253
> +	       m_encodedDataStatus = EncodedDataStatus::Error;

Could be a one liner:
m_encodedDataStatus = !m_isAllDataReceived ? EncodedDataStatus::Unknown :
EncodedDataStatus::Error;

> Source/WebCore/platform/graphics/cg/ImageDecoderCG.cpp:260
>	   RetainPtr<CFDictionaryRef> image0Properties =
adoptCF(CGImageSourceCopyPropertiesAtIndex(m_nativeDecoder.get(), 0,
imageSourceOptions().get()));

auto

> Source/WebCore/platform/graphics/cg/ImageDecoderCG.cpp:266
> +	   if (!CFDictionaryContainsKey(image0Properties.get(),
kCGImagePropertyPixelWidth) || !CFDictionaryContainsKey(image0Properties.get(),
kCGImagePropertyPixelHeight)) {

You could group both this if and previous if in a single statement.


More information about the webkit-reviews mailing list