Data Fields | |
size_t | frame_offset |
size_t | size_per_band |
size_t | plane_offset |
size_t | plane_linesize |
HqBool | multiple_planes |
unsigned int | height |
unsigned int | bandheight |
Data needed for reading memfb element planes. These assume a contiguous layout in memory for all frames of a sheet. When using the framebuffer support, it checks that all sheets have the same rendered_sheet_size, all frames have the same rendered_size_per_band, the same rendered_frame_size, and all planes have the same linesize.
We can calculate the offset of this plane knowing the frame's omitted index, the plane's omitted index, and the rendered size of frames and planes. We can calculate the band number from the line and band height to calculate the offset of the start of the band from the frame, add the plane offset to get the start of the plane in the band, and use the plane's linesize to find the start of the line in the plane. If there is more than one plane per frame, then we also need to limit the number of lines read to the end of the band to avoid encroaching onto another channel.
unsigned int memfb_element_reader::bandheight |
Band height, copied here for easy access and to avoid casting.
size_t memfb_element_reader::frame_offset |
Offset of frame from start of sheet buffer.
unsigned int memfb_element_reader::height |
Raster height, copied here for easy access and to avoid casting.
HqBool memfb_element_reader::multiple_planes |
Are there more than one plane per frame?
size_t memfb_element_reader::plane_linesize |
Size of each line in plane.
size_t memfb_element_reader::plane_offset |
Offset of this plane in contiguous band memory.
size_t memfb_element_reader::size_per_band |
Size of all planes in each band of a frame.