69#define ROP_REV_POLISH(revPolish, x) \
70 static blit_scanline_t rop##revPolish(blit_scanline_t fetch, \
71 blit_scanline_t store); \
72 blit_scanline_t rop##revPolish(blit_scanline_t fetch, \
73 blit_scanline_t store) { \
171 &ropSDna, &ropDn, &ropDSx, &ropDSan,
172 &ropDSa, &ropDSxn, &ropD, &ropDSno,
173 &ropS, &ropSDno, &ropDSo, &rop1};
206 if (!blit_rgn1_slip(x) || !blit_rgn1_clip(x, result->
width - x->
origin) ||
214 if (!blit_rgn1_slip(y) || !blit_rgn1_clip(y, result->
height - y->
origin) ||
231 const int extra_scan_count = (x_max >> 3) - (x->
origin >> 3);
234 const int offset = result->
stride - 1 - extra_scan_count;
235 const int offset_source = source->
stride - 1 - extra_scan_count;
276 if (extra_scan_count == 0) {
280 fetch_logic_mask_store(&align, rop2, scan_mask,
store++);
282 align.
store += offset_source;
287 fetch_logic_mask_store(&align, rop2, scan_origin_mask,
store++);
288 int extra = extra_scan_count;
290 fetch_logic_store(&align, rop2,
store++);
292 fetch_logic_mask_store(&align, rop2, scan_extent_mask,
store++);
294 align.
store += offset_source;
301 const int x_extent,
const int y_extent,
302 const struct blit_scan *source,
const int x_source,
303 const int y_source,
enum blit_rop2 rop2) {
325 *store = (*store &
~mask) |
Phase alignment for 8-bit bytes.
void blit_phase_align_prefetch(struct blit_phase_align *align)
Prefetches the next byte into the alignment structure.
void blit_phase_align_start(struct blit_phase_align *align, int x, int x_store, const blit_scanline_t *store)
Initialises the phase alignment structure.
blit_scanline_t blit_phase_align_fetch(struct blit_phase_align *align)
Fetches the next byte from the phase alignment structure.
blit_scanline_t(* blit_rop2_func_t)(blit_scanline_t fetch, blit_scanline_t store)
Type definition for raster operation function pointer.
bool blit_rgn1_rop2(struct blit_scan *result, struct blit_rgn1 *x, struct blit_rgn1 *y, const struct blit_scan *source, enum blit_rop2 rop2)
Perform raster operation with masking and store the result.
#define ROP_REV_POLISH(revPolish, x)
Macro to define a raster operation function.
#define D
8-bit destination operand.
#define S
8-bit source operand.
Binary raster operations.
blit_rop2
Enumeration of binary raster operation codes.
uint8_t blit_scanline_t
Type definition for a scanline element.
Phase alignment structure.
const blit_scanline_t * store
Pointer to the data being processed.
One-dimensional region structure.
int origin
Origin of the region.
int origin_source
Source origin of the region.
int extent
Extent of the region.
int height
Height of the scanline buffer in pixels.
int stride
Stride of the scanline buffer.
int width
Width of the scanline buffer in pixels.