mirror of
https://github.com/servo/servo.git
synced 2025-09-30 00:29:14 +01:00
script: Generate only a single frame during "update the rendering" (#38858)
Instead of generating a frame for every display list, which might be one rendered frame per `<iframe>`, generate only a single frame per call to "update the rendering." This should make rendering more efficient when there are `<iframe>`s present and also open up optimizations for non-display list frames. Testing: This could potentially reduce flashing of content during rendering updates, but that is very difficult to test. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
parent
4f68508624
commit
e7a963cca0
6 changed files with 40 additions and 10 deletions
|
@ -2111,6 +2111,9 @@ impl Window {
|
|||
// properly process ScrollBehavior here.
|
||||
let reflow_phases_run =
|
||||
self.reflow(ReflowGoal::UpdateScrollNode(scroll_id, Vector2D::new(x, y)));
|
||||
if reflow_phases_run.needs_frame() {
|
||||
self.compositor_api().generate_frame();
|
||||
}
|
||||
|
||||
// > If the scroll position did not change as a result of the user interaction or programmatic
|
||||
// > invocation, where no translations were applied as a result, then no scrollend event fires
|
||||
|
@ -2351,7 +2354,9 @@ impl Window {
|
|||
// iframe size updates.
|
||||
//
|
||||
// See <https://github.com/servo/servo/issues/14719>
|
||||
self.Document().update_the_rendering();
|
||||
if self.Document().update_the_rendering().needs_frame() {
|
||||
self.compositor_api().generate_frame();
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn layout_blocked(&self) -> bool {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue