mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
script: Consolidate step 22 of per-Document
rendering update (#37703)
The parts of step 22 were a bit scattered throughout the codebase, so this change moves them all to a single method which does three things: 1. Update all animating images 2. Flush all dirty canvases (2D, WebGL, and WebGPU) 3. Calls reflow on the `Document` Testing: This shouldn't change behavior in any major way so it should be covered by existing WPT tests. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
parent
152eb63fb3
commit
f745bad37d
3 changed files with 40 additions and 57 deletions
|
@ -2173,17 +2173,8 @@ impl Window {
|
|||
let document = self.Document();
|
||||
|
||||
let stylesheets_changed = document.flush_stylesheets_for_reflow();
|
||||
|
||||
// If this reflow is for display, ensure webgl canvases are composited with
|
||||
// up-to-date contents.
|
||||
let for_display = reflow_goal.needs_display();
|
||||
if for_display {
|
||||
document.flush_dirty_webgl_canvases();
|
||||
document.flush_dirty_2d_canvases();
|
||||
}
|
||||
|
||||
let pending_restyles = document.drain_pending_restyles();
|
||||
|
||||
let dirty_root = document
|
||||
.take_dirty_root()
|
||||
.filter(|_| !stylesheets_changed)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue