Date: Fri, 26 Apr 2019 16:38:23 +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: r346754 - head/lib/libvgl Message-ID: <201904261638.x3QGcNCF086853@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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); } /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201904261638.x3QGcNCF086853>