Harlequin RIP SDK

Parameters to acquire a framebuffer using framebuffer_acquire() or fbassoc_acquire(). More...

#include "framebuffer.h"

Data Fields

size_t size
 Size of this structure.
 
const RasterDescriptionrd
 
frame_acquire_fnacquire_fn
 
frame_release_fnrelease_fn
 
frame_raster_fnraster_fn
 
framebuffer_data_release_fndata_release_fn
 
void * data
 
HqBool exact_buffer_sizes
 
HqBool handle_per_sheet
 
HqBool allow_reuse
 

Detailed Description

Parameters to acquire a framebuffer using framebuffer_acquire() or fbassoc_acquire().

Field Documentation

◆ acquire_fn

frame_acquire_fn* framebuffer_acquire_t::acquire_fn

Initializer for the framebuffer_t::acquire_fn field.

A callback function to acquire frame handles for each frame. If this function pointer is NULL, then both the framebuffer_acquire_t::release_fn and framebuffer_acquire_t::raster_fn pointers must also be NULL, and the frames will be acquired using malloc() and released using free().

The frame handle acquire function. The raster backend should not manipulate this field: it is modified through framebuffer_acquire().

Parameters
[in]sizeThe size of the raster data required. If the framebuffer_t::exact_buffer_sizes field is FALSE, then this may be larger than the required size for the data. A page with dynamic separations may require additional frames for a final paint. All frames within the framebuffer are allocated with the same size, so if exact sizing is not used, the additional frames may be larger than is strictly necessary for the raster.
[in]idThe frame ID (or sheet ID if allocating a buffer per sheet) for which this buffer is being acquired. This allows placement of raster data for different colorants or channel types in particular locations. It will only be useful if the client is releasing or taking ownership of all of the buffers after each page is rendered, otherwise buffers will be re-used by the framebuffer code for different frames or sheets without re-allocation. The client can determine how to place buffers by looking up the ID in the raster layout. The raster layout could be referenced through a structure supplied as the data pointer to framebuffer_acquire().
[in]dataThe data pointer supplied by the caller to framebuffer_acquire().
[out]perrA location in which an error code is stored, if the frame could not be acquired.
Returns
A handle used to access the raster data for the specified frame or sheet, or NULL if an error occurred and the handle could not be acquired. The handles returned may be the raster data address if there is no management of the handle required. They can also be complex structures containing other metadata required to manage the framebuffer's raster data. A separate callback (of frame_raster_fn type) is used to derive the base address of the raster data from the handle.

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

◆ allow_reuse

HqBool framebuffer_acquire_t::allow_reuse

Allow reusing of the unkeyed framebuffer when calling fbassoc_acquire(). If a framebuffer has previously been marked for reuse with fbassoc_reuse(), it will be re-used if this is TRUE. This field is not used by framebuffer_acquire().

◆ data

void* framebuffer_acquire_t::data

Initializer for the framebuffer_t::data field.

An opaque pointer supplied to the framebuffer_t::acquire_fn, framebuffer_t::release_fn, and framebuffer_t::raster_fn callbacks.

The frame handle client data pointer. The raster backend should not manipulate this field: it is modified through framebuffer_acquire(). The lifetime of the data should be at least as long as the framebuffer object. If the framebuffer_t::data_release_fn function pointer is non-NULL, it will be called to release framebuffer_t::data during framebuffer_release(). The data pointer is not released when a framebuffer is reused with framebuffer_reuse().

◆ data_release_fn

framebuffer_data_release_fn* framebuffer_acquire_t::data_release_fn

Initializer for the framebuffer_t::data_release_fn field.

A callback function to release the framebuffer's opaque data pointer. The data pointer supplied in framebuffer_acquire_t::data mush have a lifetime at least as long as the framebuffer object. If this function pointer is not NULL, the function will be called in framebuffer_release(), after the frame associations are destroyed.

The frame handle client data release function. The raster backend should not manipulate this field: it is modified through framebuffer_acquire().

If this pointer is non-NULL, the function is called during framebuffer_release().

Parameters
[in]dataThe framebuffer_t::data pointer, originally supplied to framebuffer_acquire() or fbassoc_acquire() in the framebuffer_acquire_t::data field.

◆ exact_buffer_sizes

HqBool framebuffer_acquire_t::exact_buffer_sizes

Initializer for the framebuffer_t::exact_buffer_sizes field.

If the framebuffer is used for a larger raster size, and then a smaller raster is requested, should the framebuffer re-allocate the buffers? The client can set this field to TRUE to force re-allocation if a new buffer size is less than the existing size.

◆ handle_per_sheet

HqBool framebuffer_acquire_t::handle_per_sheet

Initializer for the framebuffer_t::handle_per_sheet field.

Is the framebuffer is being used to manage one raster for the whole sheet, rather than one raster per frame? The client can change this field value, but only before using any framebuffer functions. It should not be changed if a framebuffer is in use.

◆ raster_fn

frame_raster_fn* framebuffer_acquire_t::raster_fn

Initializer for the framebuffer_t::raster_fn field.

A callback function to get the raster data address from frame handles acquired using framebuffer_acquire_t::acquire_fn. If this function pointer is NULL, then both the framebuffer_acquire_t::acquire_fn and framebuffer_acquire_t::release_fn pointers must also be NULL, and the frames will be acquired using malloc() and released using free().

The frame handle raster function. The raster backend should not manipulate this field: it is modified through framebuffer_acquire().

Frame handles need not be the data address themselves. They can be complex structures containing other metadata required to manage the framebuffer's raster data. This function type is used when the address of the framebuffer's raster data is required by the framebuffer functions.

Parameters
[in]handleA frame handle returned by the framebuffer::frame_acquire function.
[in]offsetAn offset into the frame or sheet raster data for the start of the data to be returned. This must be within the size acquired using the framebuffer::frame_acquire function.
[in]sizeThe size of the data window in the frame or sheet raster data for the data returned. The end of the data window must be at or below the size acquire using framebuffer::frame_acquire function.
Returns
A non-NULL pointer to a buffer of raster data of the size and offset specified.

◆ rd

const RasterDescription* framebuffer_acquire_t::rd

A raster description prepared for rendering a sheet. This raster description must be unpacked (the raster layout pointer must be valid).

◆ release_fn

frame_release_fn* framebuffer_acquire_t::release_fn

Initializer for the framebuffer_t::release_fn field.

A callback function to release frame handles acquired using framebuffer_acquire_t::acquire_fn. If this function pointer is NULL, then both the framebuffer_acquire_t::acquire_fn and framebuffer_acquire_t::raster_fn pointers must also be NULL, and the frames will be acquired using malloc() and released using free().

The frame handle release function. The raster backend should not manipulate this field: it is modified through framebuffer_acquire().

This function will be called by the framebuffer functions when they need to release a previously-allocated frame. After this function is called by the framebuffer functions, the framebuffer will make no more reference to the handle.

Parameters
[in]handleA frame handle returned by the framebuffer::acquire_fn function.
[in]sizeThe raster size originally supplied to the framebuffer::frame_acquire function.
[in]dataThe data pointer originally supplied to the framebuffer::frame_acquire function.

The documentation for this struct was generated from the following file: