[webkit-changes] [WebKit/WebKit] a9fa14: [UnifiedPDF] Re-enable asynchronous drawing for th...
Simon Fraser
noreply at github.com
Wed May 29 08:35:10 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: a9fa14bfb0da82fad6677a9b9da150b3e4d5782a
https://github.com/WebKit/WebKit/commit/a9fa14bfb0da82fad6677a9b9da150b3e4d5782a
Author: Simon Fraser <simon.fraser at apple.com>
Date: 2024-05-29 (Wed, 29 May 2024)
Changed paths:
M Source/WebCore/platform/graphics/ca/PlatformCALayer.h
M Source/WebCore/platform/graphics/ca/TileGrid.cpp
M Source/WebCore/platform/graphics/ca/cocoa/PlatformCALayerCocoa.h
M Source/WebCore/platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm
M Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm
M Source/WebKit/WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemote.h
M Source/WebKit/WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemote.mm
Log Message:
-----------
[UnifiedPDF] Re-enable asynchronous drawing for the contents layer
https://bugs.webkit.org/show_bug.cgi?id=274387
rdar://128389156
Reviewed by Abrar Rahman Protyasha.
When accelerated drawing was enabled, bringing a background tab containing PDF to the front
could result in missing high-resolution tiles (rdar://127869064). This happened because the
PDF's tiled layer never sends `willRepaintTile()` callbacks in this case, since the code path
that deals with IOSurface volatility, in `RemoteLayerBackingStore::needsDisplay()()`, didn't
ever call -setNeedsDisplay() on the tile layers; it just added their backing stores to the
list of backing stores that needed display in `RemoteLayerBackingStoreCollection::backingStoreWillBeDisplayed()`.
Fix by making it possible for TileGrid to query `layer->needsDisplay()` by implementing
`PlatformCALayer::needsDisplay()`, and use this in `TileGrid::ensureTilesForRect()`.
Drive-by fix for TileGrid::ValidationPolicyFlag dumping.
* Source/WebCore/platform/graphics/ca/PlatformCALayer.h:
* Source/WebCore/platform/graphics/ca/TileGrid.cpp:
(WebCore::operator<<):
(WebCore::TileGrid::revalidateTiles):
(WebCore::TileGrid::ensureTilesForRect):
(WebCore::validationPolicyAsString): Deleted.
* Source/WebCore/platform/graphics/ca/cocoa/PlatformCALayerCocoa.h:
* Source/WebCore/platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
(WebCore::PlatformCALayerCocoa::needsDisplay const):
* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm:
(WebKit::UnifiedPDFPlugin::ensureLayers):
* Source/WebKit/WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemote.h:
* Source/WebKit/WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemote.mm:
(WebKit::PlatformCALayerRemote::needsDisplay const):
Canonical link: https://commits.webkit.org/279442@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list