Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: a9ca2712f944864544be392b09fdc34ab5d354d5
      
https://github.com/WebKit/WebKit/commit/a9ca2712f944864544be392b09fdc34ab5d354d5
  Author: Simon Fraser <simon.fra...@apple.com>
  Date:   2024-05-14 (Tue, 14 May 2024)

  Changed paths:
    M Source/WebCore/Headers.cmake
    M Source/WebCore/WebCore.xcodeproj/project.pbxproj
    A Source/WebCore/platform/graphics/TileGridIdentifier.h
    M Source/WebCore/platform/graphics/TiledBacking.h
    M Source/WebCore/platform/graphics/ca/TileController.cpp
    M Source/WebCore/platform/graphics/ca/TileGrid.cpp
    M Source/WebCore/platform/graphics/ca/TileGrid.h
    M Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/AsyncPDFRenderer.h
    M Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/AsyncPDFRenderer.mm

  Log Message:
  -----------
  Allow a TiledBackingClient to be a client for multiple TiledBackings
rdar://128073464
https://bugs.webkit.org/show_bug.cgi?id=274164

Reviewed by Sammy Gill.

AsyncPDFRenderer will need to handle multiple TiledBackings in future, and 
currently
there's no way to tell which TiledBacking a client callback is associated with. 
So
pass a `TiledBacking&` to all the client callbacks.

Also make TileGrid identifiers unique; previously they were 0 or 1, but that 
allows
for confusion between TileGrids belonging to different TiledBackings. So give 
TileGrid
a TileGridIdentifier and pass it to the client callbacks.

We also have to add TiledBackingClient::willRemoveGrid() so that clients don't
accumulate data for TileGrids that have gone away (now that the identifiers are
monotonically increasing). AsyncPDFRenderer implements this, but it will 
actually
never get hit because AsyncPDFRenderer doesn't enable two-level tile caches.

* Source/WebCore/Headers.cmake:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/platform/graphics/TileGridIdentifier.h: Added.
* Source/WebCore/platform/graphics/TiledBacking.h:
* Source/WebCore/platform/graphics/ca/TileController.cpp:
(WebCore::TileController::setContentsScale):
(WebCore::TileController::setCoverageRect):
(WebCore::TileController::willRepaintTile):
(WebCore::TileController::willRemoveTile):
(WebCore::TileController::willRepaintAllTiles):
* Source/WebCore/platform/graphics/ca/TileGrid.cpp:
(WebCore::TileGrid::TileGrid):
* Source/WebCore/platform/graphics/ca/TileGrid.h:
(WebCore::TileGrid::identifier const):
* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/AsyncPDFRenderer.h:
(WebKit::TileForGrid::computeHash const):
(WTF::TileForGridHash::hash):
(WTF::TileForGridHash::equal):
(WTF::HashTraits<WebKit::TileForGrid>::emptyValue):
(WTF::HashTraits<WebKit::TileForGrid>::deletedValue):
(WebKit::AsyncPDFRenderer::TileRenderInfo::equivalentForPainting const): 
Deleted.
(WebKit::AsyncPDFRenderer::TileRenderInfo::equivalentForPaintingIgnoringContentVersion
 const): Deleted.
(WebKit::AsyncPDFRenderer::renderInfoForTile): Deleted.
(WebKit::AsyncPDFRenderer::enqueueTilePaintIfNecessary): Deleted.
* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/AsyncPDFRenderer.mm:
(WebKit::AsyncPDFRenderer::willRepaintTile):
(WebKit::AsyncPDFRenderer::willRemoveTile):
(WebKit::AsyncPDFRenderer::willRepaintAllTiles):
(WebKit::AsyncPDFRenderer::coverageRectDidChange):
(WebKit::AsyncPDFRenderer::tilingScaleFactorDidChange):
(WebKit::AsyncPDFRenderer::willRemoveGrid):
(WebKit::operator<<):

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

Reply via email to