Ream v0.1.0-1
C++ graphics library for Linux
Loading...
Searching...
No Matches
Public Member Functions | List of all members
RVKPass Class Referencefinal

Vulkan render pass. More...

#include <RVKPass.h>

+ Inheritance diagram for RVKPass:

Public Member Functions

SkCanvas * getCanvas (bool sync=true) const noexcept override
 Returns the SkCanvas associated with this pass, if available.
 
RPaintergetPainter (bool sync=true) const noexcept override
 Returns the RPainter associated with this pass, if available.
 
void setGeometry (const RSurfaceGeometry &geometry) noexcept override
 Sets transformation matrices.
 
- Public Member Functions inherited from RPass
 ~RPass () noexcept
 Destroys the render pass.
 
CZBitset< RPassCap > caps () const noexcept
 Returns the capabilities enabled for this pass.
 
void resetGeometry () noexcept
 Resets the geometry to the default RSurface geometry.
 
const RSurfaceGeometrygeometry () const noexcept
 Returns the current geometry for this pass.
 
std::shared_ptr< RSurfacesurface () const noexcept
 Returns the destination surface being rendered into.
 
void save () noexcept
 Saves the state of both RPainter and SkCanvas.
 
void restore () noexcept
 Restores the most recently saved state of RPainter and SkCanvas.
 
- Public Member Functions inherited from RObject
 RObject ()=default
 Constructs a default RObject.
 

Detailed Description

Vulkan render pass.

Multiplexes an RVKPainter and a Skia SkCanvas over the same VkImage. On destruction it flushes and submits any deferred Skia work so the rendering is realized on the queue before the base RPass publishes the image's write RSync (an empty submit ordered after it on the same queue), then reconciles the image's tracked VkImageLayout with Skia's.

Member Function Documentation

◆ getCanvas()

SkCanvas * getCanvas ( bool  sync = true) const
overridevirtualnoexcept

Returns the SkCanvas associated with this pass, if available.

Parameters
syncWhether to synchronize and prepare the canvas for rendering. Pass false only if you intend to update canvas parameters without rendering.
Returns
A pointer to the SkCanvas, or nullptr if SkCanvas is not supported by this pass.

Implements RPass.

◆ getPainter()

RPainter * getPainter ( bool  sync = true) const
overridevirtualnoexcept

Returns the RPainter associated with this pass, if available.

Parameters
syncWhether to synchronize and prepare the painter for rendering. Pass false only if you intend to update painter parameters without rendering.
Returns
A pointer to the RPainter, or nullptr if RPainter is not supported by this pass.

Implements RPass.

◆ setGeometry()

void setGeometry ( const RSurfaceGeometry geometry)
overridevirtualnoexcept

Sets transformation matrices.

Updates both SkCanvas and RPainter transformation matrices to align with the given surface geometry.

Parameters
geometryThe geometry to apply.

Implements RPass.