Skip to content

Commit e741bdc

Browse files
committed
Surface should be Sync too.
Bug: 307535208 Test: m rust Change-Id: I0b9d19fec972f1bc6f72e625166e372e48aa08ed
1 parent 8ee0ef1 commit e741bdc

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)