Harlequin RIP SDK

Type containing a framebuffer instance's data. More...

#include "framebuffer.h"

Data Fields

frame_descriptor_tframes
 
unsigned int n_frames
 
unsigned int n_frames_needed
 
size_t alloc_size
 
size_t frame_size
 
size_t sheet_size
 
size_t band_size
 
size_t band_height
 
size_t bytes_per_line
 
frame_acquire_fnacquire_fn
 
frame_release_fnrelease_fn
 
frame_raster_fnraster_fn
 
void * data
 
HqBool exact_buffer_sizes
 
HqBool handle_per_sheet
 

Detailed Description

Type containing a framebuffer instance's data.

Each raster backend using a framebuffer must instantiate one of these structures, either globally, or in a structure that will last at least through all of the render passes for each page. The raster backend should initialize the framebuffer structure to zero before the first call to any of the framebuffer functions.

The raster backend may read field values from this structure for information, but should not modify any of the fields directly unless explicitly documented.

Field Documentation

◆ acquire_fn

frame_acquire_fn* framebuffer_t::acquire_fn

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.

◆ alloc_size

size_t framebuffer_t::alloc_size

The allocated size used for rasters in the framebuffer. The raster backend should not manipulate this field: it is modified through framebuffer_acquire() and framebuffer_recalculate().

◆ band_height

size_t framebuffer_t::band_height

The band height of each band in frames in the framebuffer. The raster backend should not manipulate this field: it is modified through framebuffer_acquire() and framebuffer_recalculate().

◆ band_size

size_t framebuffer_t::band_size

The number of bytes in each band of a sheet in the framebuffer. The raster backend should not manipulate this field: it is modified through framebuffer_acquire() and framebuffer_recalculate().

◆ bytes_per_line

size_t framebuffer_t::bytes_per_line

The number of bytes in each line in frames in the framebuffer. The raster backend should not manipulate this field: it is modified through framebuffer_acquire() and framebuffer_recalculate().

◆ data

void* framebuffer_t::data

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

◆ exact_buffer_sizes

HqBool framebuffer_t::exact_buffer_sizes

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.

◆ frame_size

size_t framebuffer_t::frame_size

The number of bytes in each frame of a sheet in the framebuffer. The raster backend should not manipulate this field: it is modified through framebuffer_acquire() and framebuffer_recalculate().

◆ frames

frame_descriptor_t* framebuffer_t::frames

An array of structures associating frames with raster buffers. The raster backend should not manipulate this field: it is modified through framebuffer_acquire(), framebuffer_release(), and framebuffer_recalculate().

◆ handle_per_sheet

HqBool framebuffer_t::handle_per_sheet

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.

◆ n_frames

unsigned int framebuffer_t::n_frames

The number of frames stored in the framebuffer. This may be larger than the number of rendered frames, if frames stored for partial paint are not used in a final render pass, or frame handles are not released between pages. The raster backend should not manipulate this field: it is modified through framebuffer_acquire() and framebuffer_release().

◆ n_frames_needed

unsigned int framebuffer_t::n_frames_needed

The number of frames needed by the framebuffer. This may differ from the number of stored frames, if framebuffer_recalculate() has been called since the last framebuffer_acquire() or framebuffer_release(). The raster backend should not manipulate this field: it is modified through framebuffer_recalculate().

◆ raster_fn

frame_raster_fn* framebuffer_t::raster_fn

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.

◆ release_fn

frame_release_fn* framebuffer_t::release_fn

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.

◆ sheet_size

size_t framebuffer_t::sheet_size

The number of bytes in each sheet in the framebuffer. The raster backend should not manipulate this field: it is modified through framebuffer_acquire() and framebuffer_recalculate().


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