From 1589fe54047e0363db6b404aa1ba87fd76fd1a52 Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Thu, 30 Jul 2015 20:04:43 -0700 Subject: [PATCH] compositing: Don't count the root layer when checking to see when to take the screenshot, as it isn't painted after first layout comes in. --- components/compositing/compositor.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/components/compositing/compositor.rs b/components/compositing/compositor.rs index 3e786e94d93..0061a4baa40 100644 --- a/components/compositing/compositor.rs +++ b/components/compositing/compositor.rs @@ -1324,7 +1324,12 @@ impl IOCompositor { // have not requested a paint of the current epoch. // If a layer has sent a request for the current epoch, but it hasn't // arrived yet then this layer is waiting for a paint message. - if layer_data.requested_epoch == current_epoch && layer_data.painted_epoch != current_epoch { + // + // Also don't check the root layer, because the paint task won't paint + // anything for it after first layout. + if layer_data.id != LayerId::null() && + layer_data.requested_epoch == current_epoch && + layer_data.painted_epoch != current_epoch { return true; }