[webkit-changes] [WebKit/WebKit] de51c9: [UnifiedPDF] Graphics layers being painted into sh...
Abrar Rahman Protyasha
noreply at github.com
Thu May 9 10:11:21 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: de51c9aa825be4197d3c939729de3c9998b4150c
https://github.com/WebKit/WebKit/commit/de51c9aa825be4197d3c939729de3c9998b4150c
Author: Abrar Rahman Protyasha <a_protyasha at apple.com>
Date: 2024-05-09 (Thu, 09 May 2024)
Changed paths:
M Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm
Log Message:
-----------
[UnifiedPDF] Graphics layers being painted into should use asynchronous drawing
https://bugs.webkit.org/show_bug.cgi?id=273916
rdar://127767482
Reviewed by Simon Fraser.
After 278263 at main, we no longer need to provide PDFKit with a platform
context, and thus have no need for WP-backed graphics layers. This means
that we can use asynchronous drawing for all layers we paint things into,
which includes the layers for content, page background, and selection.
Our primary motivation to make this change is improved performance when
rendering PDFs.
In this patch, we enable asynchronous drawing for the aforementioned
graphics layers. We do so unconditionally for the selection and page
background layers, since they never need a platform context.
For the content layer, we condition enablement of asynchronous drawing
on our runtime ability to paint selections into their own layer, since
in that case we need not pass a platform context to PDFKit.
* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm:
(WebKit::UnifiedPDFPlugin::ensureLayers):
(WebKit::UnifiedPDFPlugin::updatePageBackgroundLayers):
(WebKit::UnifiedPDFPlugin::layerNeedsPlatformContext const):
(WebKit::UnifiedPDFPlugin::updateOverflowControlsLayers):
(WebKit::UnifiedPDFPlugin::positionOverflowControlsLayers):
Canonical link: https://commits.webkit.org/278569@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