mirror of
https://github.com/servo/servo
synced 2026-05-09 16:42:16 +02:00
Motivation: The font cache currently has to store a cache of Keys which need to be given by the webrender instance. Having a cache for every WebViewId in the future when we have every webview have the different webrender::DocumentId might be too wasteful to store this key cache per DocumentId. This proposes to include in the WebViewId another id, the RenderingGroupId. This id can be easily changed to be equivalent to the DocumentId when we support multiple DocumentIds for a unique Webrender instance. Additionally this will keep it easier to integrate the currently out of tree patches for multiple rendering contexts with different webrenders. Change: We introduce the RenderingGroupId in the WebViewId and allow a method to extract it. The font key cache uses this cache and forwards it to the Compositor when requesting new changes. The compositor currently ignores this id. Additionally, the WebView can return the RenderingGroupId. The WebViewId also has an appropiate constructor for specifying a RenderingGroupId. Because there currently will be only one RenderingGroupId the performance will be minimal. Signed-off-by: Narfinger <Narfinger@users.noreply.github.com> Testing: This should be covered by WPT tests and normal browsing behavior works fine. --------- Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>