Harlequin RIP SDK

Support for local memory framebuffers for eHVD elements. More...

#include "std.h"
#include "rrevents.h"
#include "swdevice.h"
#include "skinras.h"
#include "hvdlib.h"

Data Structures

struct  memfb_framebuffer_data
 Structure type for use as type for data pointer when using framebuffer support to manage local memory rasters. More...
 

Typedefs

typedef struct HVD_memfb_raster HVD_memfb_raster
 
typedef struct memfb_framebuffer_data memfb_framebuffer_data
 Structure type for use as type for data pointer when using framebuffer support to manage local memory rasters. More...
 

Functions

HVD_memfb_rastermemfb_raster_create (RasterDescription *pRD, HqBool fSysAlloc, size_t rasterSize, size_t userSize, HqnResult *perr)
 Function to create raster handles for passing to HVD_monitor_add_raster() when using local memory rasters. More...
 
uint8memfb_raster_buffer (HVD_memfb_raster *raster, size_t start, size_t length)
 Get the data address from a local memory raster handle. More...
 
void * memfb_raster_userdata (HVD_memfb_raster *raster)
 Get the user data address from a local memory raster handle. More...
 
void memfb_raster_error (HVD_memfb_raster **ppraster)
 The RIP failed to construct a raster. Mark it with error, and release the raster handle. More...
 
void memfb_raster_release (HVD_element *pElement, void *hraster)
 Function to use as HVD_raster_release_fn callback when using local memory elements. More...
 
HqBool memfb_recovery_filter (HVD_element *pElement, HVD_recovery_reason_t reason)
 Function to use as HVD_recovery_filter_fn callback when using local memory elements. More...
 
const RasterDescriptionmemfb_raster_description (void *elementRaster)
 Function to use as hvd_output_page_params::raster_description_fn when using local memory elements. More...
 
void * memfb_element_raster_open (void *elementRaster, struct RASTER_PLANE *plane, HqnResult *perr)
 Function to use as hvd_output_page_params::element_raster_open when using local memory elements. More...
 
const uint8memfb_element_raster_map (void *context, void *elementRaster, unsigned int *pstartline, unsigned int *pnlines, HqnResult *perr)
 
void memfb_element_raster_close (void *context, void *elementRaster)
 
void * memfb_acquire (size_t size, uint32 id, void *data, HqnResult *perr)
 Function to use as frame_acquire_fn when using framebuffer support to manage local memory rasters. More...
 
void memfb_release (void *handle, size_t size, void *data)
 Function to use as frame_release_fn when using framebuffer support to manage local memory rasters. More...
 
uint8memfb_raster (void *handle, size_t offset, size_t size)
 Function to use as frame_raster_fn when using framebuffer support to manage local memory rasters. More...
 

Detailed Description

Support for local memory framebuffers for eHVD elements.

This is the interface between the local memory eHVD element buffers and raster backends.

The framebuffer must be configured to use one handle per sheet, rather than a handle per frame.

Typedef Documentation

◆ HVD_memfb_raster

typedef struct HVD_memfb_raster HVD_memfb_raster

Local memory HVD raster data.

Function Documentation

◆ memfb_raster_buffer()

uint8* memfb_raster_buffer ( HVD_memfb_raster raster,
size_t  start,
size_t  length 
)

Get the data address from a local memory raster handle.

Parameters
[in]rasterA raster handle previously created by memfb_raster_create().
[in]startThe start offset of the portion of the data to return.
[in]lengthThe length of the portion of the data to return.
Returns
The address of a raster buffer holding portions of the raster starting at offset start and extending for length. This buffer cannot extend beyond the number of bytes passed in the rasterSize parameter to memfb_raster_create().

Only one raster buffer can be active at a time; calling this function will invalidate the pointer returned by a previous call. Data outside of the window start..start+length may be compressed or purged to storage.

◆ memfb_raster_create()

HVD_memfb_raster* memfb_raster_create ( RasterDescription pRD,
HqBool  fSysAlloc,
size_t  rasterSize,
size_t  userSize,
HqnResult perr 
)

Function to create raster handles for passing to HVD_monitor_add_raster() when using local memory rasters.

Parameters
[in]pRDThe raster description the raster is being created for.
[in]fSysAllocIf TRUE, memory for the raster will be allocated from the operating system, using malloc()/free(). If FALSE, memory for the raster will be allocated from the RIP's arena using MemAlloc()/MemFree().
[in]rasterSizeThe size of the raster data expected for this separation. The address of a window of raster data can be recovered using memfb_raster_buffer().
[in]userSizeThe size of user data to allocate for this separation. The address of the user data can be recovered using memfb_raster_userdata().
[out]perrA location in which an error code is stored, if the raster handle could not be acquired or created.
Returns
The local memory raster handle, or NULL if a raster handle could not be acquired or created.

If the pointer returned is non-NULL, then *perr is not modified. If the pointer returned is NULL, then *perr is set to a code greater than MON_CLASS_ERROR indicating the error that occurred. The subclass, PS error type, and UID for the error can be deconstructed using the macros in monevent.h.

◆ memfb_raster_error()

void memfb_raster_error ( HVD_memfb_raster **  ppraster)

The RIP failed to construct a raster. Mark it with error, and release the raster handle.

Parameters
[in]pprasterA location to find the raster previously created by memfb_raster_create().

◆ memfb_raster_userdata()

void* memfb_raster_userdata ( HVD_memfb_raster raster)

Get the user data address from a local memory raster handle.

Parameters
[in]rasterA raster handle previously created by memfb_raster_create().
Returns
The address of the user data. This buffer can store the number of bytes passed in the userSize parameter to memfb_raster_create().

User data will not be purged to storage.