mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
webgl: Lazily clear the canvas right before the first webgl command of the next frame.
This commit is contained in:
parent
4d7110aca5
commit
c53680b282
8 changed files with 138 additions and 124 deletions
|
@ -1520,6 +1520,13 @@ impl Window {
|
|||
|
||||
let stylesheets_changed = document.flush_stylesheets_for_reflow();
|
||||
|
||||
// If this reflow is for display, ensure webgl canvases are composited with
|
||||
// up-to-date contents.
|
||||
match reflow_goal {
|
||||
ReflowGoal::Full => document.flush_dirty_canvases(),
|
||||
ReflowGoal::TickAnimations | ReflowGoal::LayoutQuery(..) => {},
|
||||
}
|
||||
|
||||
// Send new document and relevant styles to layout.
|
||||
let needs_display = reflow_goal.needs_display();
|
||||
let reflow = ScriptReflow {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue