1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-17 10:26:15 +00:00

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.
This commit is contained in:
Bruce Evans 2019-04-26 16:38:23 +00:00
parent 5800d10f6a
commit d6003dd3d8
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=346754

View File

@ -133,12 +133,19 @@ VGLSetXY(VGLBitmap *object, int x, int y, u_long color)
}
}
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:
@ -157,19 +164,6 @@ __VGLGetXY(VGLBitmap *object, int x, int y)
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);
}
/*
* Symmetric Double Step Line Algorithm by Brian Wyvill from
* "Graphics Gems", Academic Press, 1990.