clippy: fix warnings in components/compositing (#31987)

This commit is contained in:
Azhar Ismagulova 2024-04-03 18:19:15 +01:00 committed by GitHub
parent 3c249b0d5b
commit 03b752289e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View file

@ -1189,8 +1189,8 @@ impl<Window: WindowMethods + ?Sized> IOCompositor<Window> {
}
self.send_root_pipeline_display_list();
self.create_or_update_pipeline_details_with_frame_tree(&frame_tree, None);
self.reset_scroll_tree_for_unattached_pipelines(&frame_tree);
self.create_or_update_pipeline_details_with_frame_tree(frame_tree, None);
self.reset_scroll_tree_for_unattached_pipelines(frame_tree);
self.frame_tree_id.next();
}

View file

@ -242,13 +242,13 @@ pub struct EmbedderCoordinates {
impl EmbedderCoordinates {
/// Get the unflipped viewport rectangle for use with the WebRender API.
pub fn get_viewport(&self) -> DeviceIntRect {
self.viewport.clone()
self.viewport
}
/// Flip the given rect.
/// This should be used when drawing directly to the framebuffer with OpenGL commands.
pub fn flip_rect(&self, rect: &DeviceIntRect) -> DeviceIntRect {
let mut result = rect.clone();
let mut result = *rect;
result.min.y = self.framebuffer.height - result.min.y - result.size().height;
result
}