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_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. More... | |
uint8 * | memfb_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 RasterDescription * | memfb_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 uint8 * | memfb_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... | |
uint8 * | memfb_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... | |
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 struct HVD_memfb_raster HVD_memfb_raster |
Local memory HVD raster data.
uint8* memfb_raster_buffer | ( | HVD_memfb_raster * | raster, |
size_t | start, | ||
size_t | length | ||
) |
Get the data address from a local memory raster handle.
[in] | raster | A raster handle previously created by memfb_raster_create(). |
[in] | start | The start offset of the portion of the data to return. |
[in] | length | The length of the portion of the data to return. |
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.
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.
[in] | pRD | The raster description the raster is being created for. |
[in] | fSysAlloc | If 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] | rasterSize | The 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] | userSize | The size of user data to allocate for this separation. The address of the user data can be recovered using memfb_raster_userdata(). |
[out] | perr | A location in which an error code is stored, if the 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.
void memfb_raster_error | ( | HVD_memfb_raster ** | ppraster | ) |
The RIP failed to construct a raster. Mark it with error, and release the raster handle.
[in] | ppraster | A location to find the raster previously created by memfb_raster_create(). |
void* memfb_raster_userdata | ( | HVD_memfb_raster * | raster | ) |
Get the user data address from a local memory raster handle.
[in] | raster | A raster handle previously created by memfb_raster_create(). |
userSize
parameter to memfb_raster_create().User data will not be purged to storage.