Skip to content

Commit b43f8bd

Browse files
committed
More docs on contentsGravity
1 parent d6e3e30 commit b43f8bd

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

wgpu-hal/src/metal/surface.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,9 @@ impl super::Surface {
230230
let frame: CGRect = msg_send![root_layer, bounds];
231231
let () = msg_send![new_layer, setFrame: frame];
232232

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

0 commit comments

Comments
 (0)