|
| virtual std::shared_ptr< RGBMBo > | gbmBo (RDevice *device=nullptr) const noexcept=0 |
| | Returns the GBM buffer object backing this image, if any.
|
| |
| virtual std::shared_ptr< RDRMFramebuffer > | drmFb (RDevice *device=nullptr) const noexcept=0 |
| | Returns a DRM framebuffer for this image, if supported.
|
| |
| virtual sk_sp< SkImage > | skImage (RDevice *device=nullptr) const noexcept=0 |
| | Returns an SkImage view of this image, if supported (RImageCap_SkImage).
|
| |
| virtual sk_sp< SkSurface > | skSurface (RDevice *device=nullptr) const noexcept=0 |
| | Returns an SkSurface targeting this image, if supported (RImageCap_SkSurface).
|
| |
| virtual CZBitset< RImageCap > | checkDeviceCaps (CZBitset< RImageCap > caps, RDevice *device=nullptr) const noexcept=0 |
| | Checks which of the given capabilities are supported on a device.
|
| |
| virtual bool | writePixels (const RPixelBufferRegion ®ion) noexcept=0 |
| | Uploads pixel data into a region of the image.
|
| |
| virtual bool | readPixels (const RPixelBufferRegion ®ion) noexcept=0 |
| | Downloads pixel data from a region of the 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< 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.
|
| |
A GPU-accessible image buffer.
RImage is the fundamental buffer type: a 2D image that can be used as a sampling source, a render target (via RSurface), or shared with other devices and processes.
Images may be backed by different storage depending on the requested capabilities: native (API-optimal) storage, GBM/DMA-buf storage suitable for KMS scanout and cross-device sharing, or dumb buffers. An image can be created with RImage::Make(), imported from a DMA-buf with RImage::FromDMA(), or wrapped around an existing backend handle.
Pixel data can be uploaded/downloaded with writePixels()/readPixels(), and access is coordinated across threads and devices through per-image read/write RSync fences.