Skip to content

Commit

Permalink
More docs on contentsGravity
Browse files Browse the repository at this point in the history
  • Loading branch information
madsmtm committed Sep 4, 2024
1 parent d6e3e30 commit b43f8bd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions wgpu-hal/src/metal/surface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,9 @@ impl super::Surface {
let frame: CGRect = msg_send![root_layer, bounds];
let () = msg_send![new_layer, setFrame: frame];

// The gravity to use when the layer's `drawableSize` isn't the
// same as the bounds rectangle.
//
// The desired content gravity is `kCAGravityResize`, because it
// masks / alleviates issues with resizing when
// `present_with_transaction` is disabled, and behaves better when
Expand Down

0 comments on commit b43f8bd

Please sign in to comment.