[webkit-changes] [WebKit/WebKit] dbb838: [UnifiedPDF] Make a background layers for each PDF...

Simon Fraser noreply at github.com
Thu Feb 8 21:34:01 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: dbb83825aeb7df83fc9c46a57eaaa663c47f8d9d
      https://github.com/WebKit/WebKit/commit/dbb83825aeb7df83fc9c46a57eaaa663c47f8d9d
  Author: Simon Fraser <simon.fraser at apple.com>
  Date:   2024-02-08 (Thu, 08 Feb 2024)

  Changed paths:
    M Source/WebCore/platform/graphics/GraphicsLayer.cpp
    M Source/WebCore/platform/graphics/GraphicsLayer.h
    M Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/PDFDocumentLayout.h
    M Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.h
    M Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm

  Log Message:
  -----------
  [UnifiedPDF] Make a background layers for each PDF page
https://bugs.webkit.org/show_bug.cgi?id=268834
<rdar://problem/122399196>

Reviewed by Tim Horton.

When we start drawing PDF off the main thread, we'll need to have synchronously-drawn
boxes for where the pages will be. We can do that by making a small layer hierarchy
per page consisting of layers with no backing store, but just a white fill color,
and shadows.

The PDF continues to be painted into m_contentsLayer, which is higher in z-order than
the collection of page background layers.

* Source/WebCore/platform/graphics/GraphicsLayer.cpp:
(WebCore::GraphicsLayer::setIsInWindow):
* Source/WebCore/platform/graphics/GraphicsLayer.h:
* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/PDFDocumentLayout.h:
* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.h:
* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm:
(WebKit::UnifiedPDFPlugin::ensureLayers):
(WebKit::UnifiedPDFPlugin::updatePageBackgroundLayers):
(WebKit::UnifiedPDFPlugin::updateLayerHierarchy):
(WebKit::UnifiedPDFPlugin::didChangeSettings):
(WebKit::UnifiedPDFPlugin::didChangeIsInWindow):
(WebKit::UnifiedPDFPlugin::paintContents):
(WebKit::UnifiedPDFPlugin::paintPDFContent):
(WebKit::UnifiedPDFPlugin::setPageScaleFactor):
(WebKit::UnifiedPDFPlugin::updateOverflowControlsLayers):
(WebKit::UnifiedPDFPlugin::setActiveAnnotation):

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




More information about the webkit-changes mailing list