|
| RGLTexture | texture (RGLDevice *device=nullptr) const noexcept |
| | Returns the OpenGL texture id and target for the given device.
|
| |
| std::optional< GLuint > | glFb (RGLDevice *device=nullptr) const noexcept |
| | Returns a GL framebuffer object that renders into this image, for the given device.
|
| |
| std::shared_ptr< REGLImage > | eglImage (RGLDevice *device=nullptr) const noexcept |
| | Returns the EGLImage backing this image on the given device.
|
| |
| EGLSurface | eglSurface (RGLDevice *device=nullptr) const noexcept |
| | Returns the EGLSurface this image renders into, if any.
|
| |
| 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.
|
| |
| RGLDevice * | allocator () const noexcept |
| | Returns the device that allocated this image as an RGLDevice.
|
| |
| 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< RGLImage > | Make (SkISize size, const RDRMFormat &format, const RImageConstraints *constraints=nullptr) noexcept |
| | Creates an OpenGL-backed image.
|
| |
| static std::shared_ptr< RGLImage > | FromDMA (const RDMABufferInfo &info, CZOwn ownership, const RImageConstraints *constraints=nullptr) noexcept |
| | Creates an image by importing an existing DMA-buffer.
|
| |
| static std::shared_ptr< RGLImage > | BorrowFramebuffer (const RGLFramebufferInfo &info, RGLDevice *allocator=nullptr) noexcept |
| | Wraps an existing OpenGL framebuffer as an image.
|
| |
| static std::shared_ptr< RGLImage > | FromEGLSurface (const REGLSurfaceInfo &info, CZOwn ownership, RGLDevice *allocator=nullptr) noexcept |
| | Wraps an existing EGLSurface as an 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.
|
| |
OpenGL backend implementation of RImage.
Backs a Ream image with OpenGL ES/EGL resources. Depending on how it was created, storage is either GBM/DMA-buf (importable across devices as an EGLImage/texture) or native GL. GL objects (textures, framebuffers, EGLImages, Skia images/surfaces) are created lazily per device and, for context-specific objects, per GL context, and cached.
Obtain it from an RImage via RImage::asGL().