|
| std::shared_ptr< RGBMBo > | gbmBo (RDevice *device=nullptr) const noexcept override |
| | Returns the GBM buffer object backing this image, if any.
|
| |
| std::shared_ptr< RDRMFramebuffer > | drmFb (RDevice *device=nullptr) const noexcept override |
| | Returns a DRM framebuffer for this image, if supported.
|
| |
| sk_sp< SkImage > | skImage (RDevice *device=nullptr) const noexcept override |
| | Returns an SkImage view of this image, if supported (RImageCap_SkImage).
|
| |
| sk_sp< SkSurface > | skSurface (RDevice *device=nullptr) const noexcept override |
| | Returns an SkSurface targeting this image, if supported (RImageCap_SkSurface).
|
| |
| CZBitset< RImageCap > | checkDeviceCaps (CZBitset< RImageCap > caps, RDevice *device=nullptr) const noexcept override |
| | Checks which of the given capabilities are supported on a device.
|
| |
| bool | writePixels (const RPixelBufferRegion ®ion) noexcept override |
| | Uploads pixel data into a region of the image.
|
| |
| bool | readPixels (const RPixelBufferRegion ®ion) noexcept override |
| | Downloads pixel data from a region of the image.
|
| |
| RVKDevice * | allocatorVK () const noexcept |
| | The device that allocated this image (owner of the primary VkImage).
|
| |
| VkImage | vkImage () const noexcept |
| | The primary VkImage (on the allocator device).
|
| |
| VkImageView | vkImageView () const noexcept |
| | The primary VkImageView (on the allocator device).
|
| |
| VkImage | vkImage (RVKDevice *device) const noexcept |
| | The VkImage for device: the primary image on the allocator, else the per-device cross-device import (VK_NULL_HANDLE if not imported).
|
| |
| VkImageView | vkImageView (RVKDevice *device) const noexcept |
| | The VkImageView for device (see vkImage(RVKDevice*)).
|
| |
| VkFormat | vkFormat () const noexcept |
| | The image's VkFormat.
|
| |
| VkImageUsageFlags | vkUsage () const noexcept |
| | The image's VkImageUsageFlags.
|
| |
| VkImageTiling | vkTiling () const noexcept |
| | The image's VkImageTiling (OPTIMAL for native storage, DRM_FORMAT_MODIFIER for dma-buf).
|
| |
| std::optional< RDMABufferInfo > | dmaExport () const noexcept |
| | dma-buf export of this image (single plane), for cross-device sharing / scanout.
|
| |
| bool | ensureCrossDevice (RVKDevice *device) const noexcept |
| | Ensures this image is sampleable on device by importing its dma-buf there.
|
| |
| void | transitionLayout (VkCommandBuffer cmd, VkImageLayout newLayout, VkPipelineStageFlags srcStage, VkPipelineStageFlags dstStage, VkAccessFlags srcAccess, VkAccessFlags dstAccess) const noexcept |
| | Records a layout transition barrier on the given command buffer.
|
| |
| VkImageLayout | layout () const noexcept |
| | The tracked VkImageLayout of the primary image.
|
| |
| VkImageLayout | layout (RVKDevice *device) const noexcept |
| | The tracked VkImageLayout for device (primary image on the allocator, else the per-device cross-device import).
|
| |
| void | syncLayoutFromSkia () const noexcept |
| | Reconciles the tracked layout with Skia's after Skia rendered into this image.
|
| |
| SkISize | size () const noexcept |
| | Returns the image size in pixels.
|
| |
| const RFormatInfo & | formatInfo () const noexcept |
| | Returns information about the image's pixel format.
|
| |
| const std::unordered_set< RFormat > & | readFormats () const noexcept |
| | Returns the set of formats the image can be read/sampled as.
|
| |
| const std::unordered_set< RFormat > & | writeFormats () const noexcept |
| | Returns the set of formats the image can be written to.
|
| |
| SkAlphaType | alphaType () const noexcept |
| | Returns the image's alpha type.
|
| |
| RModifier | modifier () const noexcept |
| | Returns the DRM format modifier of the image's storage.
|
| |
| RDevice * | allocator () const noexcept |
| | Returns the device that allocated this image.
|
| |
| std::shared_ptr< RCore > | core () const noexcept |
| | Returns the RCore instance that owns this image.
|
| |
| std::shared_ptr< RSync > | readSync () noexcept |
| | Returns the read sync fence.
|
| |
| void | setReadSync (std::shared_ptr< RSync > sync) noexcept |
| | Sets the read sync fence.
|
| |
| std::shared_ptr< RSync > | writeSync () noexcept |
| | Returns the write sync fence.
|
| |
| void | setWriteSync (std::shared_ptr< RSync > sync) noexcept |
| | Sets the write sync fence.
|
| |
| UInt32 | writeSerial () const noexcept |
| | Returns the write serial.
|
| |
| std::shared_ptr< RGLImage > | asGL () const noexcept |
| | Attempts to cast this image to an RGLImage.
|
| |
| std::shared_ptr< RRSImage > | asRS () const noexcept |
| | Attempts to cast this image to an RRSImage.
|
| |
| std::shared_ptr< RVKImage > | asVK () const noexcept |
| | Attempts to cast this image to an RVKImage.
|
| |
| | ~RImage () noexcept |
| | Destructor.
|
| |
| | RObject ()=default |
| | Constructs a default RObject.
|
| |
|
| static std::shared_ptr< RVKImage > | Make (SkISize size, const RDRMFormat &format, const RImageConstraints *constraints=nullptr) noexcept |
| | Creates a Vulkan-backed image of the given size and DRM format.
|
| |
| static std::shared_ptr< RVKImage > | FromDMA (const RDMABufferInfo &info, CZOwn ownership, const RImageConstraints *constraints=nullptr) noexcept |
| | Imports an existing dma-buf as a Vulkan-backed image.
|
| |
| static std::shared_ptr< RImage > | Make (SkISize size, const RDRMFormat &format, const RImageConstraints *constraints=nullptr) noexcept |
| | Allocates a new empty image.
|
| |
| static std::shared_ptr< RImage > | MakeFromPixels (const RPixelBufferInfo &info, const RDRMFormat &format, const RImageConstraints *constraints=nullptr) noexcept |
| | Allocates a new image and uploads pixel data into it.
|
| |
| static std::shared_ptr< RImage > | LoadFile (const std::filesystem::path &path, const RDRMFormat &format, SkISize size={0, 0}, const RImageConstraints *constraints=nullptr) noexcept |
| | Loads an image from a file.
|
| |
| static std::shared_ptr< RImage > | FromDMA (const RDMABufferInfo &info, CZOwn ownership, const RImageConstraints *constraints=nullptr) noexcept |
| | Imports an image from a DMA-buf.
|
| |
Vulkan implementation of RImage, obtained via RImage::asVK().
Backs the image with either native (VK_IMAGE_TILING_OPTIMAL, device-local) storage or GBM/dma-buf storage imported via VK_EXT_image_drm_format_modifier + external memory (for scanout and cross-device sharing). Explicit DRM format modifiers are used; multi-plane buffers are only supported when all planes reside in a single dma-buf memory object.
The tracked VkImageLayout is kept in sync with Skia's backend texture/render target so manual barriers and Skia rendering can interoperate. For cross-device sampling (SRM Prime) the image is lazily re-imported on the sampling device, keyed per device.