Title: [282090] trunk/Source/WebKit
- Revision
- 282090
- Author
- [email protected]
- Date
- 2021-09-07 09:30:15 -0700 (Tue, 07 Sep 2021)
Log Message
Post-layout `EditorState` updates should be scheduled using `RenderingUpdateScheduler`
https://bugs.webkit.org/show_bug.cgi?id=229905
Reviewed by Simon Fraser.
Use `Page::scheduleRenderingUpdate` rather than `DrawingArea::triggerRenderingUpdate` to ensure that we schedule
a layer tree flush when sending a full post-layout `EditorState` update to the UI process. On macOS, the latter
method on DrawingArea will immediately install a runloop observer for the next CA commit, while the former only
does so after a zero-delay timer fires, courtesy of RenderingUpdateScheduler.
This prevents us from triggering unnecessary layer tree flushes in the case where the selection changes
frequently during a single rendering update; in particular, in Speedometer 2 on macOS, this decreases the total
number of rendering updates performed over the course of the benchmark by roughly 30%.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::scheduleFullEditorStateUpdate):
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (282089 => 282090)
--- trunk/Source/WebKit/ChangeLog 2021-09-07 16:26:29 UTC (rev 282089)
+++ trunk/Source/WebKit/ChangeLog 2021-09-07 16:30:15 UTC (rev 282090)
@@ -1,3 +1,22 @@
+2021-09-07 Wenson Hsieh <[email protected]>
+
+ Post-layout `EditorState` updates should be scheduled using `RenderingUpdateScheduler`
+ https://bugs.webkit.org/show_bug.cgi?id=229905
+
+ Reviewed by Simon Fraser.
+
+ Use `Page::scheduleRenderingUpdate` rather than `DrawingArea::triggerRenderingUpdate` to ensure that we schedule
+ a layer tree flush when sending a full post-layout `EditorState` update to the UI process. On macOS, the latter
+ method on DrawingArea will immediately install a runloop observer for the next CA commit, while the former only
+ does so after a zero-delay timer fires, courtesy of RenderingUpdateScheduler.
+
+ This prevents us from triggering unnecessary layer tree flushes in the case where the selection changes
+ frequently during a single rendering update; in particular, in Speedometer 2 on macOS, this decreases the total
+ number of rendering updates performed over the course of the benchmark by roughly 30%.
+
+ * WebProcess/WebPage/WebPage.cpp:
+ (WebKit::WebPage::scheduleFullEditorStateUpdate):
+
2021-09-07 Adrian Perez de Castro <[email protected]>
Non-unified build fixes, early September 2021 edition
Modified: trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp (282089 => 282090)
--- trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp 2021-09-07 16:26:29 UTC (rev 282089)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp 2021-09-07 16:30:15 UTC (rev 282090)
@@ -6524,9 +6524,7 @@
else
m_pendingEditorStateUpdateStatus = PendingEditorStateUpdateStatus::Scheduled;
- // FIXME: Scheduling a compositing layer flush here can be more expensive than necessary.
- // Instead, we should just compute and send post-layout editor state during the next frame.
- m_drawingArea->triggerRenderingUpdate();
+ m_page->scheduleRenderingUpdate(RenderingUpdateStep::LayerFlush);
}
#if HAVE(TOUCH_BAR)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes