Bug 224526 - Disable hardware JPEG decoding on x86 Mac for WK1
Summary: Disable hardware JPEG decoding on x86 Mac for WK1
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: Images (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Said Abou-Hallawa
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-04-13 20:55 PDT by Said Abou-Hallawa
Modified: 2021-05-05 12:36 PDT (History)
2 users (show)

See Also:


Attachments
Patch (2.10 KB, patch)
2021-04-13 21:09 PDT, Said Abou-Hallawa
sam: review-
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 Said Abou-Hallawa 2021-04-13 20:55:17 PDT
Similar to bug 216377, we need to disable hardware JPEG decoding on x86 Mac for WK1 also. Some of the pre-installed apps, which use WK1, have experienced perf regression because of hardware JPEG decoding. WebKit does not own the decision whether an image is worth hardware decoding or not. This decision depends on heuristics which are run by system underlying frameworks.
Comment 1 Said Abou-Hallawa 2021-04-13 21:05:00 PDT
<rdar://74939829>
Comment 2 Said Abou-Hallawa 2021-04-13 21:09:11 PDT
Created attachment 425948 [details]
Patch
Comment 3 Sam Weinig 2021-04-14 19:40:04 PDT
Comment on attachment 425948 [details]
Patch

Will this disable it for the whole process? Or just WebKit’s uses?
Comment 4 Said Abou-Hallawa 2021-04-15 18:29:08 PDT
I think it will disable if for the whole process. The image decoding happens underneath WebKit. The only way to disable the HW decoding is do this globally. Do you think there will be a problem with doing this?
Comment 5 Sam Weinig 2021-04-17 12:03:14 PDT
Comment on attachment 425948 [details]
Patch

You need to do this without effecting the whole process. Loading WebKit should not change the behavior of code / frameworks that happen to be running in the same app.
Comment 6 Sam Weinig 2021-04-17 12:04:03 PDT
(In reply to Said Abou-Hallawa from comment #4)
> I think it will disable if for the whole process. The image decoding happens
> underneath WebKit. The only way to disable the HW decoding is do this
> globally. Do you think there will be a problem with doing this?

Yep. We really can't do that. You will need to ask for API/SPI to disable it on a per-call basis.
Comment 7 Said Abou-Hallawa 2021-05-05 12:36:27 PDT
(In reply to Sam Weinig from comment #6)
> (In reply to Said Abou-Hallawa from comment #4)
> > I think it will disable if for the whole process. The image decoding happens
> > underneath WebKit. The only way to disable the HW decoding is do this
> > globally. Do you think there will be a problem with doing this?
> 
> Yep. We really can't do that. You will need to ask for API/SPI to disable it
> on a per-call basis.

I agree. I think the approach of this patch is incorrect.