mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
clippy: fix warnings in components/compositing (#31987)
This commit is contained in:
parent
3c249b0d5b
commit
03b752289e
2 changed files with 4 additions and 4 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue