Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 689dde6b1d01550737623461501ad501d52a05a1
      
https://github.com/WebKit/WebKit/commit/689dde6b1d01550737623461501ad501d52a05a1
  Author: Tim Horton <[email protected]>
  Date:   2025-04-08 (Tue, 08 Apr 2025)

  Changed paths:
    M Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/AsyncPDFRenderer.h
    M Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/AsyncPDFRenderer.mm
    M 
Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/PDFPresentationController.mm

  Log Message:
  -----------
  REGRESSION (288361@main): [UnifiedPDF] PDF with 1800 pages reliably 
jetsams/crashes the web content process
https://bugs.webkit.org/show_bug.cgi?id=291239
rdar://147425807

Reviewed by Abrar Rahman Protyasha.

As part of an attempt to share repaint code between multiple callers, 
288361@main
caused us to kick off page preview renders for every page in the document,
burning CPU and quickly causing us to run out of memory.

To avoid this, rename and adjust `setNeedsPagePreviewRenderForPageCoverage` to
`invalidatePreviewsForPageCoverage`, which is what it really needs to do:
mark the existing previews as no longer viable.

Then, kick off preview rendering for *just* the pages that are currently inside
the tile coverage, regardless of which pages were invalidated.

* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/AsyncPDFRenderer.h:
* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/AsyncPDFRenderer.mm:
(WebKit::AsyncPDFRenderer::ensurePreviewsForCurrentPageCoverage):
(WebKit::AsyncPDFRenderer::coverageRectDidChange):
(WebKit::AsyncPDFRenderer::invalidatePreviewsForPageCoverage):
(WebKit::AsyncPDFRenderer::setNeedsPagePreviewRenderForPageCoverage): Deleted.
* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/PDFPresentationController.mm:
(WebKit::PDFPresentationController::setNeedsRepaintForPageCoverage):

Canonical link: https://commits.webkit.org/293398@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to