Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Apr 2019 18:28:54 +0000 (UTC)
From:      Bruce Evans <bde@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r346761 - head/lib/libvgl
Message-ID:  <201904261828.x3QISsF4045005@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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();
   }
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201904261828.x3QISsF4045005>