ndk: Replace HardwareBufferError
with std::io::Error
through new helper conversion function
#295
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Depends on #294
These
AHardwareBuffer
functions all return standarderrno.h
error codes which can be communicated back to the user in ergonomic form instead of appearing as a newtyped struct holding a "meaningless"i32
.Perform the same conversion to just
NativeWindow::set_buffers_geometry
which also returnserrno.h
codes: this change is small enough to not warrant yet another PR, as we've already changed the exact same forInputQueueError
in #292. (Note that this is intentionally omitted from the changelog sinceset_buffers_geometry()
is only making its debut in the upcoming release, this change isn't breaking).This pattern is now prevalent across the codebase (
hardware_buffer
,surface_texture
, andnative_window
all use it), warranting the newstatus_to_io_result()
helper function to be introduced in an also-newutils.rs
module.