Skip to content

Commit

Permalink
stupid mistake in import_sync
Browse files Browse the repository at this point in the history
  • Loading branch information
i509VCB committed Nov 11, 2023
1 parent 814ce28 commit 3f10cc9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions glutin/src/api/egl/display.rs
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ impl Display {

let import = fd.try_clone_to_owned().map_err(|_| ErrorKind::BadParameter)?;

let attrs: [egl::types::EGLAttrib; 3] =
let attrs: [egl::types::EGLint; 3] =
[egl::SYNC_NATIVE_FENCE_FD_ANDROID as _, import.as_raw_fd() as _, egl::NONE as _];

// SAFETY:
Expand All @@ -298,7 +298,7 @@ impl Display {
self.inner.egl.CreateSyncKHR(
*self.inner.raw,
egl::SYNC_NATIVE_FENCE_ANDROID,
attrs.as_ptr().cast(),
attrs.as_ptr(),
)
};

Expand Down
4 changes: 2 additions & 2 deletions glutin_examples/examples/egl_sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ mod example {
assert!(sync.client_wait(Some(Duration::ZERO), false).unwrap());

// // By default all new Syncs are not signalled.
assert!(!sync.is_signalled().unwrap());
// assert!(!sync.is_signalled().unwrap());

if display.extensions().contains("EGL_ANDROID_native_fence_sync") {
println!("EGL Android native fence sync is supported");
Expand All @@ -78,7 +78,7 @@ mod example {
let sync_fd = sync.export_sync_fd().expect("Export failed");

// To show that an exported sync fd can be imported, we will reimport the sync
// fd.
// fd we just exported.
let _imported_sync = display.import_sync(sync_fd.as_fd()).expect("Import failed");

Check failure on line 82 in glutin_examples/examples/egl_sync.rs

View workflow job for this annotation

GitHub Actions / Tests (1.65.0, x86_64-unknown-linux-gnu, ubuntu-latest)

no method named `as_fd` found for struct `OwnedFd` in the current scope

Check failure on line 82 in glutin_examples/examples/egl_sync.rs

View workflow job for this annotation

GitHub Actions / Tests (1.65.0, i686-unknown-linux-gnu, ubuntu-latest)

no method named `as_fd` found for struct `OwnedFd` in the current scope

Check failure on line 82 in glutin_examples/examples/egl_sync.rs

View workflow job for this annotation

GitHub Actions / Tests (1.65.0, x86_64-unknown-linux-gnu, ubuntu-latest, --no-default-features, egl,wayland)

no method named `as_fd` found for struct `OwnedFd` in the current scope

Check failure on line 82 in glutin_examples/examples/egl_sync.rs

View workflow job for this annotation

GitHub Actions / Tests (1.65.0, x86_64-unknown-linux-gnu, ubuntu-latest, --no-default-features, egl,wayland,x11)

no method named `as_fd` found for struct `OwnedFd` in the current scope

Check failure on line 82 in glutin_examples/examples/egl_sync.rs

View workflow job for this annotation

GitHub Actions / Tests (1.65.0, x86_64-unknown-linux-gnu, ubuntu-latest, --no-default-features, egl,x11)

no method named `as_fd` found for struct `OwnedFd` in the current scope
}
}
Expand Down

0 comments on commit 3f10cc9

Please sign in to comment.