mirror of
https://github.com/servo/servo.git
synced 2025-06-20 07:08:59 +01:00
Merge pull request #2759 from zwarich/cleanup-get-buffer-request
Cleanup `get_buffer_request`
This commit is contained in:
commit
19560c0390
1 changed files with 3 additions and 4 deletions
|
@ -371,7 +371,7 @@ impl CompositorData {
|
||||||
CompositorData::build_layer_tree(layer.clone(), graphics_context);
|
CompositorData::build_layer_tree(layer.clone(), graphics_context);
|
||||||
}
|
}
|
||||||
|
|
||||||
let transform = |kid: Rc<ContainerLayer<CompositorData>>| -> bool {
|
let get_child_buffer_request = |kid: Rc<ContainerLayer<CompositorData>>| -> bool {
|
||||||
match kid.extra_data.borrow().scissor {
|
match kid.extra_data.borrow().scissor {
|
||||||
Some(scissor) => {
|
Some(scissor) => {
|
||||||
let mut new_rect = window_rect;
|
let mut new_rect = window_rect;
|
||||||
|
@ -400,9 +400,8 @@ impl CompositorData {
|
||||||
};
|
};
|
||||||
|
|
||||||
layer.children().filter(|x| !x.extra_data.borrow().hidden)
|
layer.children().filter(|x| !x.extra_data.borrow().hidden)
|
||||||
.map(transform)
|
.map(get_child_buffer_request)
|
||||||
.fold(false, |a, b| a || b) || redisplay
|
.any(|b| b) || redisplay
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Move the sublayer to an absolute position in page coordinates relative to its parent,
|
// Move the sublayer to an absolute position in page coordinates relative to its parent,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue