HomeFreeBSD

Fix removal of mouse image by the vga planar renderer in the right border

Description

Fix removal of mouse image by the vga planar renderer in the right border
in unusual cases. Optimize and significantly clean up removal in this
renderer. Optimize removal in the vga direct renderer.

Removal only needs to be done in the border (the part with pixels) in
both cases. The planar renderer used the condition scp->xoff > 0 to
test whether a right border exists. This actually tests for a left
border, and when the total horizontal border is 8 pixels, rounding gives
only a right border. This was the unusual broken case. An example
is easy to configure using something like "vidcontrol -f 8x16 iso-8x16
-g 79x25 MODE_27".

Optimize the planar case a little by only removing 9x13 active pixels
out of 16x16. Optimize it a lot by not doing anything if there is no
overlap with the border. Don't unroll the main loop or hard-code so
many assumptions about font sizes in it. On my Haswell system, graphics
memory and i/o accesses takes about 520 cycles each so optimizations from
unrolling are in the noise.

Optimize the direct case to not do anything if there is no overlap with
the border. Do a sanity check on the saveunder's coordinates. This
requires a previous change to pass non-rounded coordinates.

Details

Provenance
bdeAuthored on
Parents
rS316736: Trival style fix to previous commit to add this detail.
Branches
Unknown
Tags
Unknown