Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 37bb67537f13e0298596bbd34a07470c9bf0cff2
      
https://github.com/WebKit/WebKit/commit/37bb67537f13e0298596bbd34a07470c9bf0cff2
  Author: Kimmo Kinnunen <[email protected]>
  Date:   2024-12-11 (Wed, 11 Dec 2024)

  Changed paths:
    M LayoutTests/pdf/pdf-in-iframe-with-text-annotation.html
    M Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/AsyncPDFRenderer.h
    M Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/AsyncPDFRenderer.mm

  Log Message:
  -----------
  UnifiedPDF: Compositing spends time copying bitmaps to GPUP
https://bugs.webkit.org/show_bug.cgi?id=284366
rdar://141214825

Reviewed by Simon Fraser and Abrar Rahman Protyasha.

Store the PDF bitmap tiles as NativeImages. ImageBuffers are mutable
draw targets, something that are drawn to. NativeImages immutable images
that are drawn from.

This allows then data to be sent to GPUP only once, avoiding numerous
full-tile copies per tile draw.

For incremental PDF tile renders, render the tile in the PDF paint queue.
Previously, the rendered region was blit to the real tile in the
main thread.

* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/AsyncPDFRenderer.h:
* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/AsyncPDFRenderer.mm:
(WebKit::AsyncPDFRenderer::renderInfoIsValidForTile const):
(WebKit::AsyncPDFRenderer::willRepaintTile):
(WebKit::AsyncPDFRenderer::enqueueTileRenderForTileGridRepaint):
(WebKit::AsyncPDFRenderer::didRevalidateTiles):
(WebKit::AsyncPDFRenderer::enqueueTileRenderIfNecessary):
(WebKit::AsyncPDFRenderer::renderInfoForFullTile const):
(WebKit::AsyncPDFRenderer::renderInfoForTile const):
(WebKit::renderPDFTile):
(WebKit::AsyncPDFRenderer::serviceRequestQueue):
(WebKit::AsyncPDFRenderer::didCompleteTileRender):
(WebKit::AsyncPDFRenderer::paintTilesForPage):
(WebKit::AsyncPDFRenderer::pdfContentChangedInRect):
(WebKit::operator<<):

(WebKit::AsyncPDFRenderer::enqueueTilePaintForTileGridRepaint): Deleted.
(WebKit::AsyncPDFRenderer::enqueueTilePaintIfNecessary): Deleted.

Standardize on term "render" instead of "render" and "paint" for the
operation which updates the PDF tiles.

(WebKit::AsyncPDFRenderer::enqueuePaintWithClip): Deleted.
(WebKit::AsyncPDFRenderer::paintTileOnWorkQueue): Deleted.
(WebKit::AsyncPDFRenderer::paintPDFIntoBuffer): Deleted.
(WebKit::AsyncPDFRenderer::transferBufferToMainThread): Deleted.

Remove redundant member functions that were run in the paint queue
and only called once.

Canonical link: https://commits.webkit.org/287666@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