mirror of
https://github.com/servo/servo.git
synced 2025-06-19 22:59:03 +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);
|
||||
}
|
||||
|
||||
let transform = |kid: Rc<ContainerLayer<CompositorData>>| -> bool {
|
||||
let get_child_buffer_request = |kid: Rc<ContainerLayer<CompositorData>>| -> bool {
|
||||
match kid.extra_data.borrow().scissor {
|
||||
Some(scissor) => {
|
||||
let mut new_rect = window_rect;
|
||||
|
@ -400,9 +400,8 @@ impl CompositorData {
|
|||
};
|
||||
|
||||
layer.children().filter(|x| !x.extra_data.borrow().hidden)
|
||||
.map(transform)
|
||||
.fold(false, |a, b| a || b) || redisplay
|
||||
|
||||
.map(get_child_buffer_request)
|
||||
.any(|b| b) || redisplay
|
||||
}
|
||||
|
||||
// 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