Bug 240137 - Several tests fail because CFImageSourceCreateImageAtIndex premultiplies alpha with PNG files for iOS family devices
Summary: Several tests fail because CFImageSourceCreateImageAtIndex premultiplies alph...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-05-05 13:37 PDT by John Cunningham
Modified: 2022-05-23 11:50 PDT (History)
9 users (show)

See Also:


Attachments
Patch (4.29 KB, patch)
2022-05-05 13:42 PDT, John Cunningham
no flags Details | Formatted Diff | Diff
Patch (4.13 KB, patch)
2022-05-11 18:30 PDT, John Cunningham
no flags Details | Formatted Diff | Diff
“Patch (4.30 KB, patch)
2022-05-15 22:16 PDT, John Cunningham
no flags Details | Formatted Diff | Diff
“Patch (4.30 KB, patch)
2022-05-15 22:18 PDT, John Cunningham
no flags Details | Formatted Diff | Diff
Patch for landing (4.30 KB, patch)
2022-05-15 22:19 PDT, John Cunningham
ews-feeder: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description John Cunningham 2022-05-05 13:37:13 PDT
Several tests fail because CFImageSourceCreateImageAtIndex premultiplies alpha with PNG files for iOS family devices
Comment 1 John Cunningham 2022-05-05 13:42:06 PDT
Created attachment 458910 [details]
Patch
Comment 2 Simon Fraser (smfr) 2022-05-05 13:50:22 PDT
Comment on attachment 458910 [details]
Patch

Does this allow us to mark some iOS tests as no longer failing?
Comment 3 Alexey Proskuryakov 2022-05-05 14:20:16 PDT
Comment on attachment 458910 [details]
Patch

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

> Source/WebCore/platform/graphics/cg/ImageDecoderCG.cpp:79
> +#if HAVE(IMAGE_IO_CREATE_UNPREMULTIPLIED_PNG) && USE(APPLE_INTERNAL_SDK)

USE(APPLE_INTERNAL_SDK) seems wrong here, and should probably be omitted? We even redeclare the symbol for open source builds (and will need to add .tbd, but that can be done later).
Comment 4 John Cunningham 2022-05-11 18:30:43 PDT
Created attachment 459198 [details]
Patch
Comment 5 Radar WebKit Bug Importer 2022-05-12 13:38:13 PDT
<rdar://problem/93198134>
Comment 6 Said Abou-Hallawa 2022-05-12 14:50:30 PDT
-- What is the impact of this change? Will it fix displaying some PNG images? Can you attach an image which shows the problem?

-- You said above that there are several tests which fail because we are not using kCGImageSourceCreateUnpremultipliedPNG. What are these tests? And why there is no change in the TestExpectation then?

-- Is there a perf impact because of this change?
Comment 7 Simon Fraser (smfr) 2022-05-12 15:28:07 PDT
Comment on attachment 459198 [details]
Patch

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

> Source/WTF/ChangeLog:4
> +        https://bugs.webkit.org/show_bug.cgi?id=240137

There should be a radar here too, in particular so we can correlate it with internal layout tests.

> Source/WTF/wtf/PlatformHave.h:1170
> +#define HAVE_IMAGE_IO_CREATE_UNPREMULTIPLIED_PNG 1

Elsewhere we use HAVE_IMAGEIO_
Comment 8 John Cunningham 2022-05-15 22:16:13 PDT
Created attachment 459390 [details]
“Patch
Comment 9 John Cunningham 2022-05-15 22:18:24 PDT
Created attachment 459391 [details]
“Patch
Comment 10 John Cunningham 2022-05-15 22:19:54 PDT
Created attachment 459392 [details]
Patch for landing
Comment 11 John Cunningham 2022-05-22 23:00:45 PDT
Pull request: https://github.com/WebKit/WebKit/pull/902
Comment 12 EWS 2022-05-23 11:50:51 PDT
Committed r294660 (250880@main): <https://commits.webkit.org/250880@main>

Reviewed commits have been landed. Closing PR #902 and removing active labels.