Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 59ff4f6298f32fe862e26734d2707b8a0f4beae4 https://github.com/WebKit/WebKit/commit/59ff4f6298f32fe862e26734d2707b8a0f4beae4 Author: Kimmo Kinnunen <kkinnu...@apple.com> Date: 2025-02-25 (Tue, 25 Feb 2025)
Changed paths: M Source/WebCore/platform/graphics/TiledBacking.h M Source/WebCore/platform/graphics/ca/PlatformCALayerClient.h M Source/WebCore/platform/graphics/ca/TileController.cpp M Source/WebCore/platform/graphics/ca/TileController.h M Source/WebCore/platform/graphics/ca/TileGrid.cpp M Source/WebCore/platform/graphics/ca/TileGrid.h M Source/WebKit/Shared/RemoteLayerTree/DynamicContentScalingImageBufferBackend.h M Source/WebKit/Shared/RemoteLayerTree/DynamicContentScalingImageBufferBackend.mm M Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStore.h M Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStore.mm M Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTree.serialization.in M Source/WebKit/Shared/RemoteLayerTree/RemoteLayerWithInProcessRenderingBackingStore.h M Source/WebKit/Shared/RemoteLayerTree/RemoteLayerWithInProcessRenderingBackingStore.mm M Source/WebKit/Shared/RemoteLayerTree/RemoteLayerWithRemoteRenderingBackingStore.h M Source/WebKit/Shared/RemoteLayerTree/RemoteLayerWithRemoteRenderingBackingStore.mm 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/PDFDiscretePresentationController.h M Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/PDFDiscretePresentationController.mm M Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/PDFScrollingPresentationController.h M Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/PDFScrollingPresentationController.mm Log Message: ----------- UnifiedPDF: Implement initial support for dynamic content scaling https://bugs.webkit.org/show_bug.cgi?id=287623 rdar://144775149 Reviewed by Abrar Rahman Protyasha, Tim Horton, and Simon Fraser. Add PlatformCALayerClient::platformCALayerDynamicContentScalingDisplayList(), a function to override when the layer contents provides the dynamic content scaling display lists in explicit fashion. Implement this for tiled layers that provide the PDF content through AsyncPDFRenderer. Map the platform layer to a particular tile in a tile grid, and map that tile into rendered PDF content. Make the PDF content, RenderedPDFTile, to hold the DCS display list. Generate the DCS display list by calling the PDF drawing code twice: once with a bitmap-backed ImageBuffer, once with DCS display list -backed ImageBuffer. The bifurcated ImageBuffer would not work, as the PDF drawing uses the underlying platform context that is not bifurcated. * Source/WebCore/platform/graphics/TiledBacking.h: * Source/WebCore/platform/graphics/ca/PlatformCALayerClient.h: (WebCore::PlatformCALayerClient::platformCALayerDynamicContentScalingDisplayList const): * Source/WebCore/platform/graphics/ca/TileController.cpp: (WebCore::TileController::dynamicContentScalingDisplayListForTile): * Source/WebCore/platform/graphics/ca/TileController.h: * Source/WebCore/platform/graphics/ca/TileGrid.cpp: (WebCore::TileGrid::platformCALayerDynamicContentScalingDisplayList const): * Source/WebCore/platform/graphics/ca/TileGrid.h: * Source/WebKit/Shared/RemoteLayerTree/DynamicContentScalingImageBufferBackend.h: * Source/WebKit/Shared/RemoteLayerTree/DynamicContentScalingImageBufferBackend.mm: (WebKit::DynamicContentScalingImageBufferBackend::createBackendHandle const): (WebKit::DynamicContentScalingImageBufferBackend::displayList const): * Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStore.h: (WebKit::RemoteLayerBackingStore::displayListHandle const): * Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStore.mm: (WebKit::RemoteLayerBackingStoreProperties::applyBackingStoreToLayer): * Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTree.serialization.in: The display list was incorrectly serialized as ImageBufferBackendHandle a std::variant containing also DynamicContentScalingDisplayList. Instead, mark it directly as WebCore::DynamicContentScalingDisplayList. * Source/WebKit/Shared/RemoteLayerTree/RemoteLayerWithInProcessRenderingBackingStore.h: * Source/WebKit/Shared/RemoteLayerTree/RemoteLayerWithInProcessRenderingBackingStore.mm: (WebKit::RemoteLayerWithInProcessRenderingBackingStore::displayListHandle const): * Source/WebKit/Shared/RemoteLayerTree/RemoteLayerWithRemoteRenderingBackingStore.h: * Source/WebKit/Shared/RemoteLayerTree/RemoteLayerWithRemoteRenderingBackingStore.mm: (WebKit::RemoteLayerWithRemoteRenderingBackingStore::displayListHandle const): * Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/AsyncPDFRenderer.h: * Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/AsyncPDFRenderer.mm: (WebKit::AsyncPDFRenderer::releaseMemory): (WebKit::AsyncPDFRenderer::dynamicContentScalingDisplayListForTile): (WebKit::renderPDFTile): (WebKit::renderPDFTileToImage): (WebKit::renderPDFTileToDynamicContentScalingDisplayList): (WebKit::AsyncPDFRenderer::serviceRequestQueues): (WebKit::AsyncPDFRenderer::didCompleteTileRender): (WebKit::AsyncPDFRenderer::dynamicContentScalingResourceCache): * Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/PDFDiscretePresentationController.h: * Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/PDFDiscretePresentationController.mm: (WebKit::PDFDiscretePresentationController::layerAllowsDynamicContentScaling const): * Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/PDFScrollingPresentationController.h: * Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/PDFScrollingPresentationController.mm: (WebKit::PDFScrollingPresentationController::layerAllowsDynamicContentScaling const): Canonical link: https://commits.webkit.org/291019@main To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes