summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Andrew Walbran <qwandor@google.com> 2024-01-26 11:15:01 +0000
committer Andrew Walbran <qwandor@google.com> 2024-01-26 11:30:10 +0000
commite741bdc44c21bb50b5e9e9f0cae057b80d21a749 (patch)
tree3c81fee31508f27800343bf3bf8174c672c913f5
parent8ee0ef1f38b8a1e41ccb540cfb29f9a301f403db (diff)
Surface should be Sync too.
Bug: 307535208 Test: m rust Change-Id: I0b9d19fec972f1bc6f72e625166e372e48aa08ed
-rw-r--r--libs/nativewindow/rust/src/surface.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/libs/nativewindow/rust/src/surface.rs b/libs/nativewindow/rust/src/surface.rs
index c812612d40..25fea807b5 100644
--- a/libs/nativewindow/rust/src/surface.rs
+++ b/libs/nativewindow/rust/src/surface.rs
@@ -127,6 +127,9 @@ impl_serialize_for_unstructured_parcelable!(Surface);
// SAFETY: The underlying *ANativeWindow can be moved between threads.
unsafe impl Send for Surface {}
+// SAFETY: The underlying *ANativeWindow can be used from multiple threads concurrently.
+unsafe impl Sync for Surface {}
+
/// An error code returned by methods on [`Surface`].
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
pub struct ErrorCode(i32);