mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Track whether first render has run, not whether it's currently idle
This commit is contained in:
parent
1aed7a390e
commit
16b5afb1b5
1 changed files with 3 additions and 3 deletions
|
@ -52,7 +52,7 @@ pub fn run_compositor(compositor: &CompositorTask) {
|
|||
let mut recomposite = false;
|
||||
let graphics_context = CompositorTask::create_graphics_context();
|
||||
|
||||
// Tracks whether the renderer is idle and it's now safe to perform a composite
|
||||
// Tracks whether the renderer has finished its first rendering
|
||||
let mut composite_ready = false;
|
||||
|
||||
// Keeps track of the current zoom factor
|
||||
|
@ -88,7 +88,7 @@ pub fn run_compositor(compositor: &CompositorTask) {
|
|||
ChangeReadyState(ready_state) => window.set_ready_state(ready_state),
|
||||
ChangeRenderState(render_state) => {
|
||||
window.set_render_state(render_state);
|
||||
composite_ready = render_state == IdleRenderState;
|
||||
if render_state == IdleRenderState { composite_ready = true; }
|
||||
}
|
||||
|
||||
SetUnRenderedColor(_id, color) => {
|
||||
|
@ -411,7 +411,7 @@ pub fn run_compositor(compositor: &CompositorTask) {
|
|||
// Check for messages coming from the windowing system.
|
||||
check_for_window_messages(window.recv());
|
||||
|
||||
// If asked to recomposite and renderer is in a safe/idle state
|
||||
// If asked to recomposite and renderer has run at least once
|
||||
if recomposite && composite_ready {
|
||||
recomposite = false;
|
||||
composite();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue