Use unique_ptr for AImage

This commit is contained in:
Patrick Nicolas
2024-06-13 19:16:23 +02:00
parent e385471bee
commit 91e90527be
2 changed files with 14 additions and 12 deletions
+6 -3
View File
@@ -42,6 +42,7 @@
}; \
using x##_ptr = std::unique_ptr<x, x##_deleter>;
DEUGLIFY(AImage)
DEUGLIFY(AImageReader)
DEUGLIFY(AMediaCodec)
@@ -61,6 +62,10 @@ public:
struct blit_handle
{
struct deleter
{
void operator()(AImage *);
};
xrt::drivers::wivrn::from_headset::feedback feedback;
xrt::drivers::wivrn::to_headset::video_stream_data_shard::timing_info_t timing_info;
xrt::drivers::wivrn::to_headset::video_stream_data_shard::view_info_t view_info;
@@ -70,9 +75,7 @@ public:
std::shared_ptr<mapped_hardware_buffer> vk_data;
AImage * aimage{};
~blit_handle();
AImage_ptr aimage;
};
private: