Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ndk/native_window: Add missing function wrappers #425

Merged
merged 3 commits into from
Sep 15, 2023

Conversation

MarijnS95
Copy link
Member

  • ndk/native_window: Add set_buffers_transform() API
  • ndk/native_window: Add try_allocate_buffers() API
  • ndk/native_window: Add set_frame_rate*() APIs since level 30/31

Note that this lacks ANativeWindow_readFromParcel/writeToParcel which'll only appear in API level 34 with R26 which is still in beta. Besides, we don't yet bind AParcel either.

/// codec, this call has no effect.
///
/// You can register for changes in the refresh rate using
/// [`ffi::AChoreographer_registerRefreshRateCallback()`].
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the frame rate I'm considering also binding AChoreographer soon™.

@MarijnS95 MarijnS95 force-pushed the ndk-native-window-missing-apis branch from 4c94437 to effd4f5 Compare August 22, 2023 15:00
@MarijnS95 MarijnS95 force-pushed the ndk-native-window-missing-apis branch from effd4f5 to af3ab12 Compare August 31, 2023 11:13
@@ -13,7 +13,7 @@ repository = "https://github.com/rust-mobile/ndk"
rust-version = "1.64"

[features]
all = ["audio", "bitmap","media", "api-level-30"]
all = ["audio", "bitmap","media", "api-level-31"]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like I forgot this in #428.

@MarijnS95 MarijnS95 force-pushed the ndk-native-window-missing-apis branch from af3ab12 to 0fcef2a Compare August 31, 2023 11:15
@MarijnS95 MarijnS95 force-pushed the ndk-native-window-missing-apis branch 3 times, most recently from b867105 to 9a07733 Compare September 13, 2023 21:38
This was added to the NDK with API level 26 but never made it to Rust.
Allows the user to apply mirror and rotation effects.
@MarijnS95 MarijnS95 force-pushed the ndk-native-window-missing-apis branch 2 times, most recently from cb969f2 to 7279787 Compare September 15, 2023 22:15
@MarijnS95 MarijnS95 merged commit ffdea02 into master Sep 15, 2023
36 checks passed
@MarijnS95 MarijnS95 deleted the ndk-native-window-missing-apis branch September 15, 2023 22:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant