Skip to content

Commit

Permalink
Update raw-window-handle to v0.5.0 (#319)
Browse files Browse the repository at this point in the history
  • Loading branch information
kchibisov authored Jul 19, 2022
1 parent 6acbe17 commit 814be08
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ndk/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
- **Breaking:** Upgrade to [`ndk-sys 0.4.0`](../ndk-sys/CHANGELOG.md#040-TODO-YET-UNRELEASED) and use new `enum` newtype wrappers. (#245)
- native_window: Use `release`/`acquire` for `Drop` and `Clone` respectively. (#207)
- **Breaking:** audio: Rename from `aaudio` to `audio` and drop `A` prefix. (#273)
- Implement `HasRawWindowHandle` directly on `NativeWindow`. (#274)
- Implement `HasRawWindowHandle` directly on `NativeWindow`. (#274, #319)
- **Breaking:** native_activity: Replace `CStr` return types with `Path`. (#279)
- native_window: Add `format()` getter and `set_buffers_geometry()` setter. (#276)
- native_activity: Add `set_window_format()` setter. (#277)
Expand Down
2 changes: 1 addition & 1 deletion ndk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ test = ["ffi/test", "jni", "jni-glue", "all"]
bitflags = "1.2.1"
jni-sys = "0.3.0"
num_enum = "0.5.1"
raw-window-handle = "0.4"
raw-window-handle = "0.5"
thiserror = "1.0.23"

[dependencies.jni]
Expand Down
4 changes: 2 additions & 2 deletions ndk/src/native_window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use crate::utils::status_to_io_result;

pub use super::hardware_buffer_format::HardwareBufferFormat;
use jni_sys::{jobject, JNIEnv};
use raw_window_handle::{AndroidNdkHandle, HasRawWindowHandle, RawWindowHandle};
use raw_window_handle::{AndroidNdkWindowHandle, HasRawWindowHandle, RawWindowHandle};
use std::{convert::TryFrom, ffi::c_void, io::Result, ptr::NonNull};

// [`NativeWindow`] represents the producer end of an image queue
Expand Down Expand Up @@ -39,7 +39,7 @@ impl Clone for NativeWindow {

unsafe impl HasRawWindowHandle for NativeWindow {
fn raw_window_handle(&self) -> RawWindowHandle {
let mut handle = AndroidNdkHandle::empty();
let mut handle = AndroidNdkWindowHandle::empty();
handle.a_native_window = self.ptr.as_ptr() as *mut c_void;
RawWindowHandle::AndroidNdk(handle)
}
Expand Down

0 comments on commit 814be08

Please sign in to comment.