[webkit-changes] [WebKit/WebKit] 9606ca: [UnifiedPDF] [iOS] Device rotation animation drops...
Wenson Hsieh
noreply at github.com
Mon Feb 24 18:15:07 PST 2025
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 9606ca6cea623a50e32abcdaf26780f9066155b4
https://github.com/WebKit/WebKit/commit/9606ca6cea623a50e32abcdaf26780f9066155b4
Author: Wenson Hsieh <wenson_hsieh at apple.com>
Date: 2025-02-24 (Mon, 24 Feb 2025)
Changed paths:
M Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/PDFPresentationController.h
M Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/PDFPresentationController.mm
Log Message:
-----------
[UnifiedPDF] [iOS] Device rotation animation drops multiple frames when viewing unified PDF
https://bugs.webkit.org/show_bug.cgi?id=288386
rdar://137502466
Reviewed by Abrar Rahman Protyasha and Tim Horton.
When rotating the device in Safari while viewing a PDF (with unified PDF enabled), `backboardd`
consumes a massive amount of memory (~7-8 GB on an iPad Pro), while attempting to perform a
foreground snapshot of Safari. This massive memory growth can be attributed to CoreAnimation's
attempts to render shadows behind the page background and container layers, which cause it to try
and encode giant image textures in the Metal-backed context.
For now, work around this by disabling these shadows on iOS family — in the future, we should
restore this codepath, in a way that avoids hitting this performance cliff (likely by moving off of
using platform `CAFilter`s to render shadows).
* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/PDFPresentationController.h:
* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/PDFPresentationController.mm:
(WebKit::PDFPresentationController::makePageContainerLayer):
(WebKit::PDFPresentationController::shouldAddPageBackgroundLayerShadow const):
Canonical link: https://commits.webkit.org/291001@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list