38 const AHardwareBuffer_Desc& hardware_buffer_desc);
61 vk::UniqueDeviceMemory device_memory_ = {};
62 vk::UniqueImage image_ = {};
63 vk::UniqueImageView image_view_ = {};
64 std::shared_ptr<YUVConversionVK> yuv_conversion_ = {};
65 bool needs_yuv_conversion_ =
false;
66 bool is_valid_ =
false;
A texture source that wraps an instance of AHardwareBuffer.
bool IsSwapchainImage() const override
Determines if swapchain image. That is, an image used as the root render target.
vk::Image GetImage() const override
Get the image handle for this texture source.
std::shared_ptr< YUVConversionVK > GetYUVConversion() const override
When sampling from textures whose formats are not known to Vulkan, a custom conversion is necessary t...
AHBTextureSourceVK(const std::shared_ptr< ContextVK > &context, struct AHardwareBuffer *hardware_buffer, const AHardwareBuffer_Desc &hardware_buffer_desc)
~AHBTextureSourceVK() override
vk::ImageView GetImageView() const override
Retrieve the image view used for sampling/blitting/compute with this texture source.
vk::ImageView GetRenderTargetView() const override
Retrieve the image view used for render target attachments with this texture source.
Abstract base class that represents a vkImage and an vkImageView.