From 4aa439a5a4e750ddbb01efd4cd726ecef607b8f5 Mon Sep 17 00:00:00 2001 From: Nicolas Silva Date: Mon, 19 Mar 2018 13:33:49 +0100 Subject: [PATCH] Don't generate a frame when no scene is built. --- webrender/src/render_backend.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/webrender/src/render_backend.rs b/webrender/src/render_backend.rs index 95929742a4..e61c600f91 100644 --- a/webrender/src/render_backend.rs +++ b/webrender/src/render_backend.rs @@ -963,14 +963,6 @@ impl RenderBackend { let doc = self.documents.get_mut(&document_id).unwrap(); - if !doc.can_render() { - // TODO: this happens if we are building the first scene asynchronously and - // scroll at the same time. we should keep track of the fact that we skipped - // composition here and do it as soon as we receive the scene. - op.render = false; - op.composite = false; - } - if transaction_msg.generate_frame { if let Some(ref mut ros) = doc.render_on_scroll { *ros = true; @@ -982,6 +974,14 @@ impl RenderBackend { } } + if !doc.can_render() { + // TODO: this happens if we are building the first scene asynchronously and + // scroll at the same time. we should keep track of the fact that we skipped + // composition here and do it as soon as we receive the scene. + op.render = false; + op.composite = false; + } + debug_assert!(op.render || !op.composite); if op.render {