[webkit-changes] [WebKit/WebKit] 6c12bd: [UnifiedPDF] Prepare for sharing some PDF page pai...
Simon Fraser
noreply at github.com
Tue Feb 13 09:24:00 PST 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 6c12bd338a35f85ab2f42e906e2dfc985c745e7b
https://github.com/WebKit/WebKit/commit/6c12bd338a35f85ab2f42e906e2dfc985c745e7b
Author: Simon Fraser <simon.fraser at apple.com>
Date: 2024-02-13 (Tue, 13 Feb 2024)
Changed paths:
M Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.h
M Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm
Log Message:
-----------
[UnifiedPDF] Prepare for sharing some PDF page painting data with async rendering
https://bugs.webkit.org/show_bug.cgi?id=269270
rdar://122851341
Reviewed by Tim Horton.
Async PDF painting will need to be able to paint the set of pages that intersect
with a given clipRect (corresponding to a tile) in m_contentLayer coordinates,
in a way that does not use the thread-unsafe PDFDocumentLayout.
So make a little data structure, `PDFPageCoverage` to hold enough information about
the set of pages that intersect the given rect, and their geometry.
`UnifiedPDFPlugin::pageCoverageForRect()` computes this data, and `UnifiedPDFPlugin::paintPDFContent()`
is updated to use it.
Also pass a clipRect to `UnifiedPDFPlugin::paintPDFOverlays()` to avoid filling a rect outside the clip,
and make the code easier to read.
* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.h:
* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm:
(WebKit::UnifiedPDFPlugin::pageCoverageForRect const):
(WebKit::UnifiedPDFPlugin::paintPDFContent):
(WebKit::UnifiedPDFPlugin::paintPDFOverlays):
Canonical link: https://commits.webkit.org/274552@main
More information about the webkit-changes
mailing list