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

use DisplayListBuilder::with_capacity #17406

Merged
merged 1 commit into from Jul 24, 2017
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

use DisplayListBuilder::with_capacity

  • Loading branch information
Gankra committed Jul 24, 2017
commit 855b1fe6f1f6a3a7f81114f179c1217429e5ed67
@@ -223,8 +223,9 @@ impl WebRenderDisplayListConverter for DisplayList {
fn convert_to_webrender(&self, pipeline_id: PipelineId) -> DisplayListBuilder {
let traversal = DisplayListTraversal::new(self);
let webrender_pipeline_id = pipeline_id.to_webrender();
let mut builder = DisplayListBuilder::new(webrender_pipeline_id,
self.bounds().size.to_sizef());
let mut builder = DisplayListBuilder::with_capacity(webrender_pipeline_id,
self.bounds().size.to_sizef(),
1024 * 1024); // 1 MB of space

let mut current_scroll_root_id = ClipId::root_scroll_node(webrender_pipeline_id);
builder.push_clip_id(current_scroll_root_id);
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.