Skip to content

Commit df516d7

Browse files
qwandorGerrit Code Review
authored andcommitted
Merge "Surface should be Sync too." into main
2 parents ffdc5e4 + e741bdc commit df516d7

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

libs/nativewindow/rust/src/surface.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,9 @@ impl_serialize_for_unstructured_parcelable!(Surface);
127127
// SAFETY: The underlying *ANativeWindow can be moved between threads.
128128
unsafe impl Send for Surface {}
129129

130+
// SAFETY: The underlying *ANativeWindow can be used from multiple threads concurrently.
131+
unsafe impl Sync for Surface {}
132+
130133
/// An error code returned by methods on [`Surface`].
131134
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
132135
pub struct ErrorCode(i32);

0 commit comments

Comments
 (0)