[webkit-changes] [WebKit/WebKit] ae6cb8: [UnifiedPDF] Make all painting be in-process

Tim Horton noreply at github.com
Mon Jan 29 16:17:16 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: ae6cb8babf6ed97c7a7a1d5535844b79989b0885
      https://github.com/WebKit/WebKit/commit/ae6cb8babf6ed97c7a7a1d5535844b79989b0885
  Author: Tim Horton <timothy_horton at apple.com>
  Date:   2024-01-29 (Mon, 29 Jan 2024)

  Changed paths:
    M Source/WebCore/platform/graphics/GraphicsLayerClient.h
    M Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
    M Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h
    M Source/WebCore/platform/graphics/ca/PlatformCALayer.h
    M Source/WebCore/platform/graphics/ca/PlatformCALayer.mm
    M Source/WebCore/platform/graphics/ca/PlatformCALayerClient.h
    M Source/WebCore/platform/graphics/ca/TileGrid.cpp
    M Source/WebCore/platform/graphics/ca/TileGrid.h
    M Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStoreCollection.mm
    M Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.h
    M Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm

  Log Message:
  -----------
  [UnifiedPDF] Make all painting be in-process
https://bugs.webkit.org/show_bug.cgi?id=268325
<rdar://problem/121385041>

Reviewed by Simon Fraser.

UnifiedPDFPlugin currently paints PDF content into an ImageBuffer in the
Web Content process (to keep PDF out of the GPU process, for security),
and then paints that ImageBuffer into the tiles in the GPU process (to follow
the normal flow of painting).

Skip this two step process by making the layers for UnifiedPDFPlugin
have in-process software backing store and painting directly into them.

* Source/WebCore/platform/graphics/GraphicsLayerClient.h:
(WebCore::GraphicsLayerClient::layerNeedsPlatformContext const):
* Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::platformCALayerNeedsPlatformContext const):
* Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h:
* Source/WebCore/platform/graphics/ca/PlatformCALayer.h:
* Source/WebCore/platform/graphics/ca/PlatformCALayer.mm:
(WebCore::PlatformCALayer::needsPlatformContext const):
* Source/WebCore/platform/graphics/ca/PlatformCALayerClient.h:
(WebCore::PlatformCALayerClient::platformCALayerNeedsPlatformContext const):
* Source/WebCore/platform/graphics/ca/TileGrid.cpp:
(WebCore::TileGrid::platformCALayerNeedsPlatformContext const):
* Source/WebCore/platform/graphics/ca/TileGrid.h:
* Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStoreCollection.mm:
(WebKit::RemoteLayerBackingStoreCollection::createRemoteLayerBackingStore):
Plumb around a "layer needs a platform context" bit, and, if set,
force in-process rendering.

* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.h:
Always say that UnifiedPDFPlugin needs in-process rendering.

* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm:
(WebKit::UnifiedPDFPlugin::paintPDFContent):
Avoid painting into an extra bitmap here.

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




More information about the webkit-changes mailing list