Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow marking all layers as having changed contents #97

Merged
merged 2 commits into from Aug 15, 2014

Conversation

@mrobinson
Copy link
Member

mrobinson commented Aug 3, 2014

Allow marking all layers as having changed contents, so that we can support updating all layers immediately with high-resolution tiles when pinch zoom finishes. This PR also includes more robust tracking of content_age, which should make bad behavior from the client easier to detect.

@mrobinson
Copy link
Member Author

mrobinson commented Aug 13, 2014

I rebased this to the latest and it should be ready to go now.

layers.rs Outdated
fn partial_cmp(&self, other: &ContentAge) -> Option<Ordering> {
return Some(self.age.cmp(&other.age));
}
}

This comment has been minimized.

@zwarich

zwarich Aug 13, 2014

Contributor

You should be able to use #[deriving(PartialOrd)] on this.

scene.rs Outdated
for kid in layer.children().iter() {
self.mark_all_layers_contents_as_changed_for_layer(kid.clone());
}
}

This comment has been minimized.

@zwarich

zwarich Aug 13, 2014

Contributor

The name mark_all_layer_contents_as_changed_for_layer seems better, since it's not eliding an apostrophe that can't be written in an identifier.

scene.rs Outdated
None => return,
};
self.mark_all_layers_contents_as_changed_for_layer(root_layer);
}

This comment has been minimized.

@zwarich

zwarich Aug 13, 2014

Contributor

Similarly here.

mrobinson added 2 commits Aug 3, 2014
Instead of relying on the TileGrid to track content age, just store the
information in the LayerBuffer itself. This means that we must pass it
with BufferRequests as well, so that the renderer can populate th
LayerBuffer properly.
@mrobinson
Copy link
Member Author

mrobinson commented Aug 15, 2014

Thanks for the review. I chose to rename mark_all_layers_contents_as_changed to mark_layer_contents_changed_recursively.

zwarich pushed a commit that referenced this pull request Aug 15, 2014
Allow marking all layers as having changed contents
@zwarich zwarich merged commit 5c167a7 into servo:master Aug 15, 2014
@mrobinson mrobinson deleted the mrobinson:pinch-zoom-delay branch Sep 8, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.