Author: bde Date: Fri Apr 26 18:28:54 2019 New Revision: 346761 URL: https://svnweb.freebsd.org/changeset/base/346761
Log: Use __VGLBitmapCopy() directly to show the mouse cursor. The mouse cursor must be merged with the shadow buffer on the way to the screen, and __VGLBitmapCopy() now has an option to do exactly that. This is insignificantly less efficient. Modified: head/lib/libvgl/mouse.c Modified: head/lib/libvgl/mouse.c ============================================================================== --- head/lib/libvgl/mouse.c Fri Apr 26 18:25:59 2019 (r346760) +++ head/lib/libvgl/mouse.c Fri Apr 26 18:28:54 2019 (r346761) @@ -105,24 +105,11 @@ static volatile sig_atomic_t VGLMsuppressint; void VGLMousePointerShow() { - byte buf[MOUSE_IMG_SIZE*MOUSE_IMG_SIZE*4]; - VGLBitmap buffer = - VGLBITMAP_INITIALIZER(MEMBUF, MOUSE_IMG_SIZE, MOUSE_IMG_SIZE, buf); - int pos; - if (!VGLMouseVisible) { INTOFF(); VGLMouseVisible = 1; - buffer.PixelBytes = VGLDisplay->PixelBytes; - __VGLBitmapCopy(&VGLVDisplay, VGLMouseXpos, VGLMouseYpos, - &buffer, 0, 0, MOUSE_IMG_SIZE, MOUSE_IMG_SIZE); - for (pos = 0; pos < MOUSE_IMG_SIZE*MOUSE_IMG_SIZE; pos++) - if (VGLMouseAndMask->Bitmap[pos]) - bcopy(&VGLMouseOrMask->Bitmap[pos*VGLDisplay->PixelBytes], - &buffer.Bitmap[pos*VGLDisplay->PixelBytes], - VGLDisplay->PixelBytes); - __VGLBitmapCopy(&buffer, 0, 0, VGLDisplay, - VGLMouseXpos, VGLMouseYpos, MOUSE_IMG_SIZE, MOUSE_IMG_SIZE); + __VGLBitmapCopy(&VGLVDisplay, VGLMouseXpos, VGLMouseYpos, VGLDisplay, + VGLMouseXpos, VGLMouseYpos, MOUSE_IMG_SIZE, -MOUSE_IMG_SIZE); INTON(); } } _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"