| 34f210d8 | 29-Apr-2019 |
Bruce Evans <[email protected]> |
Support all reasonable cursor sizes. Reduce the size of the standard cursor from 16x16 (with 6 columns unused) to 10x16 and rename it to the "small" cursor. Add a "large" 19x32 cursor and use it fo
Support all reasonable cursor sizes. Reduce the size of the standard cursor from 16x16 (with 6 columns unused) to 10x16 and rename it to the "small" cursor. Add a "large" 19x32 cursor and use it for screen widths larger than 800 pixels. Use libvgl's too-small indentation for the large data declarations.
MOUSE_IMG_SIZE = 16 is still part of the API. If an application supplies invalid bitmaps for the cursor, then the results may be different from before.
show more ...
|
| 5800d10f | 26-Apr-2019 |
Bruce Evans <[email protected]> |
In VGLClear(), check for the overlap of the mouse cursor in the whole display, not just in the unpanned top left corner. This currently makes no difference since the kernel erroneously doesn't allow
In VGLClear(), check for the overlap of the mouse cursor in the whole display, not just in the unpanned top left corner. This currently makes no difference since the kernel erroneously doesn't allow moving the cursor completely outside of the unpanned corner.
show more ...
|
| d0536894 | 26-Apr-2019 |
Bruce Evans <[email protected]> |
Remove save/restore of the crtc and gdc registers when showing and hiding the mouse cursor. The showing and hiding is often done asynchronously in a not very safe signal handler, but the state of th
Remove save/restore of the crtc and gdc registers when showing and hiding the mouse cursor. The showing and hiding is often done asynchronously in a not very safe signal handler, but the state of these registers and much more is protected from the signal handler in a better way by deferring mouse signals while the state is in use.
show more ...
|
| ea0a9905 | 26-Apr-2019 |
Bruce Evans <[email protected]> |
Fix the only known remaining (libvgl) bug for 24-bit modes, and enable support for 24-bit modes.
The non-segmented case has worked for a long time, but the segmented case could never have worked sin
Fix the only known remaining (libvgl) bug for 24-bit modes, and enable support for 24-bit modes.
The non-segmented case has worked for a long time, but the segmented case could never have worked since 24-bit accesses may cross a window boundary but the window was not changed in the middle of the specialized 24-bit accesses for writing a single pixel.
show more ...
|
| a73b1549 | 26-Apr-2019 |
Bruce Evans <[email protected]> |
Restore the line width in VGLEnd(). The line width may be changed by VGLSetVScreenSize(), but is not restored by mode switches to at least standard text mode, so must be restored explicitly. Standa
Restore the line width in VGLEnd(). The line width may be changed by VGLSetVScreenSize(), but is not restored by mode switches to at least standard text mode, so must be restored explicitly. Standard text mode displayed blanks when the line width was doubled.
show more ...
|
| a07067ea | 24-Apr-2019 |
Bruce Evans <[email protected]> |
Avoid hiding and unhiding the mouse cursor when copying bitmaps to the screen. Instead, copy a merged bitmap 1 line at a time.
This fixes flashing of the cursor and is faster in all modes (especial
Avoid hiding and unhiding the mouse cursor when copying bitmaps to the screen. Instead, copy a merged bitmap 1 line at a time.
This fixes flashing of the cursor and is faster in all modes (especially in planar modes).
show more ...
|
| c7432537 | 24-Apr-2019 |
Bruce Evans <[email protected]> |
Refactor mouse freezing and fix some minor bugs.
VGLMouseFreeze() now only defers mouse signals and leaves it to higher levels to hide and unhide the mouse cursor if necessary. (It is never necessa
Refactor mouse freezing and fix some minor bugs.
VGLMouseFreeze() now only defers mouse signals and leaves it to higher levels to hide and unhide the mouse cursor if necessary. (It is never necessary, but is done to simplify the implementation. It is slow and flashes the cursor. It is still done for copying bitmaps and clearing.)
VGLMouseUnFreeze() now only undoes 1 level of freezing. Its old optimization to reduce mouse redrawing is too hard to do with unhiding in higher levels, and its undoing of multiple levels was a historical mistake.
VGLMouseOverlap() determines if a region overlaps the (full) mouse region.
VGLMouseFreezeXY() is the freezing and a precise overlap check combined for the special case of writing a single pixel. This is the single-pixel case of the old VGLMouseFreeze() with cleanups.
Fixes: - check in more cases that the application didn't pass an invalid VIDBUF - check for errors from copying a bitmap to the shadow buffer - freeze the mouse before writing to the shadow buffer in all cases. This was not done for the case of writing a single pixel (there was a race) - don't spell the #defined values for VGLMouseShown as 0, 1 or boolean.
show more ...
|
| 1fa51420 | 21-Apr-2019 |
Bruce Evans <[email protected]> |
Use a shadow buffer and never read from the frame buffer. Remove large slow code for reading from the frame buffer.
Reading from the frame buffer is usually much slower than writing to the frame bu
Use a shadow buffer and never read from the frame buffer. Remove large slow code for reading from the frame buffer.
Reading from the frame buffer is usually much slower than writing to the frame buffer. Typically 10 to 100 times slower. It old modes, it takes many more PIOs, and in newer modes with no PIOs writes are often write-combined while reads remain uncached.
Reading from the frame buffer is not very common, so this change doesn't give speedups of 10 to 100 times. My main test case is a floodfill() function that reads about as many pixels as it writes. The speedups are typically a factor of 2 to 4.
Duplicating writes to the shadow buffer is slower when no reads from the frame buffer are done, but reads are often done for the pixels under the mouse cursor, and doing these reads from the shadow buffer more than compensates for the overhead of writing the shadow buffer in at least the slower modes. Management of the mouse cursor also becomes simpler.
The shadow buffer doesn't take any extra memory, except twice as much in old 4-plane modes. A buffer for holding a copy of the frame buffer was allocated up front for use in the screen switching signal handler. This wasn't changed when the handler was made async-signal safe. Use the same buffer the shadow (but make it twice as large in the 4-plane modes), and remove large special code for writing it as well as large special code for reading ut. It used to have a rawer format in the 4-plane modes. Now it has a bitmap format which takes twice as much memory but can be written almost as fast without special code.
VIDBUFs that are not the whole frame buffer were never supported, and the change depends on this. Check for invalid VIDBUFs in some places and do nothing. The removed code did something not so good.
show more ...
|