svn commit: r346754 - head/lib/libvgl
Bruce Evans
bde at FreeBSD.org
Fri Apr 26 16:38:24 UTC 2019
Author: bde
Date: Fri Apr 26 16:38:23 2019
New Revision: 346754
URL: https://svnweb.freebsd.org/changeset/base/346754
Log:
Merge __VGLGetXY() back into VGLGetXY(). They were split to simplify
the organization of fixes for the mouse cursor, but after optimizations
VGLGetXY() automatically avoids the mouse cursor.
Modified:
head/lib/libvgl/simple.c
Modified: head/lib/libvgl/simple.c
==============================================================================
--- head/lib/libvgl/simple.c Fri Apr 26 16:26:01 2019 (r346753)
+++ head/lib/libvgl/simple.c Fri Apr 26 16:38:23 2019 (r346754)
@@ -133,12 +133,19 @@ set_planar:
}
}
-static u_long
-__VGLGetXY(VGLBitmap *object, int x, int y)
+u_long
+VGLGetXY(VGLBitmap *object, int x, int y)
{
- int offset;
u_long color;
+ int offset;
+ VGLCheckSwitch();
+ if (x<0 || x>=object->VXsize || y<0 || y>=object->VYsize)
+ return 0;
+ if (object == VGLDisplay)
+ object = &VGLVDisplay;
+ else if (object->Type != MEMBUF)
+ return 0; /* invalid */
offset = (y * object->VXsize + x) * object->PixelBytes;
switch (object->PixelBytes) {
case 1:
@@ -155,19 +162,6 @@ __VGLGetXY(VGLBitmap *object, int x, int y)
return le32toh(color);
}
return 0; /* invalid */
-}
-
-u_long
-VGLGetXY(VGLBitmap *object, int x, int y)
-{
- VGLCheckSwitch();
- if (x<0 || x>=object->VXsize || y<0 || y>=object->VYsize)
- return 0;
- if (object == VGLDisplay)
- object = &VGLVDisplay;
- else if (object->Type != MEMBUF)
- return 0; /* invalid */
- return __VGLGetXY(object, x, y);
}
/*
More information about the svn-src-all
mailing list