Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 28ce0bd231af1910f25843f7a6cbed856c1aaf78
https://github.com/WebKit/WebKit/commit/28ce0bd231af1910f25843f7a6cbed856c1aaf78
Author: Simon Fraser <[email protected]>
Date: 2024-02-16 (Fri, 16 Feb 2024)
Changed paths:
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/UnifiedPDFPlugin.h
M Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm
Log Message:
-----------
[UnifiedPDF] Do more targeted repaints when annotations change
https://bugs.webkit.org/show_bug.cgi?id=269546
rdar://123066080
Reviewed by Sammy Gill.
Replace the call to updateLayerHierarchy() for annotation changes to more
focused repaints.
First, we have
`m_annotationTrackingState.startAnnotationTracking`/`finishAnnotationTracking`
go through UnifiedPDFPlugin wrappers, which can do the repaint. Then we change
those
functions to return a value to indicate if a repaint is needed. This repaint
needs to also
throw away cached tiles in some cases, so do it via
`setPDFChangedInDocumentRect()`.
Add `documentRectForAnnotation()`. This rect is then used to do the repaints.
* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/AsyncPDFRenderer.h:
* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/AsyncPDFRenderer.mm:
(WebKit::AsyncPDFRenderer::invalidateTilesForPaintingRect):
* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.h:
* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm:
(WebKit::UnifiedPDFPlugin::setPDFChangedInDocumentRect):
(WebKit::UnifiedPDFPlugin::paintHoveredAnnotationOnPage):
(WebKit::UnifiedPDFPlugin::pageIndexWithHoveredAnnotation const):
(WebKit::UnifiedPDFPlugin::handleMouseEvent):
(WebKit::UnifiedPDFPlugin::documentRectForAnnotation const):
(WebKit::UnifiedPDFPlugin::startTrackingAnnotation):
(WebKit::UnifiedPDFPlugin::finishTrackingAnnotation):
(WebKit::AnnotationTrackingState::startAnnotationTracking):
(WebKit::AnnotationTrackingState::finishAnnotationTracking):
(WebKit::AnnotationTrackingState::handleMouseDraggedOffTrackedAnnotation):
Canonical link: https://commits.webkit.org/274886@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes