Skip to content

Commit

Permalink
Track whether first render has run, not whether it's currently idle
Browse files Browse the repository at this point in the history
  • Loading branch information
dhedlund committed Dec 16, 2013
1 parent 1aed7a3 commit 16b5afb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/main/compositing/run.rs
Expand Up @@ -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
Expand Down Expand Up @@ -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) => {
Expand Down Expand Up @@ -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();
Expand Down

5 comments on commit 16b5afb

@bors-servo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from pcwalton
at dhedlund@16b5afb

@bors-servo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging dhedlund/servo/composite_when_ready = 16b5afb into auto

@bors-servo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dhedlund/servo/composite_when_ready = 16b5afb merged ok, testing candidate = 5302d87

@bors-servo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors-servo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding master to auto = 5302d87

Please sign in to comment.