VirtualBox

Changeset 69078 in vbox for trunk/src/VBox/Additions/x11


Ignore:
Timestamp:
Oct 13, 2017 3:04:27 PM (7 years ago)
Author:
vboxsync
Message:

Additions/x11/vboxvideo: Remove helpers.c and adjust places depending on it.
bugref:9017: Additions/x11: put vboxvideo into upstream X.Org

Location:
trunk/src/VBox/Additions/x11/vboxvideo
Files:
1 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/x11/vboxvideo/Makefile.kmk

    r69075 r69078  
    124124vboxvideo_drv_SOURCES = \
    125125        getmode.c \
    126         helpers.c \
    127126        pointer.c \
    128127        setmode.c \
  • trunk/src/VBox/Additions/x11/vboxvideo/vboxvideo.c

    r69075 r69078  
    252252    VBVXASSERT(pPixmap != NULL, ("Failed to get the screen pixmap.\n"));
    253253    TRACE_LOG("pPixmap=%p adjustedWidth=%d height=%d pScrn->depth=%d pScrn->bitsPerPixel=%d cbLine=%d pVBox->base=%p pPixmap->drawable.width=%d pPixmap->drawable.height=%d\n",
    254               pPixmap, adjustedWidth, height, pScrn->depth, pScrn->bitsPerPixel, cbLine, pVBox->base, pPixmap->drawable.width,
     254              (void *)pPixmap, adjustedWidth, height, pScrn->depth, pScrn->bitsPerPixel, cbLine, pVBox->base, pPixmap->drawable.width,
    255255              pPixmap->drawable.height);
    256256    if (   adjustedWidth != pPixmap->drawable.width
     
    10261026#endif
    10271027
     1028static void reprobeCursor(ScrnInfoPtr pScrn)
     1029{
     1030    if (ROOT_WINDOW(pScrn) == NULL)
     1031        return;
     1032#ifdef XF86_SCRN_INTERFACE
     1033    pScrn->EnableDisableFBAccess(pScrn, FALSE);
     1034    pScrn->EnableDisableFBAccess(pScrn, TRUE);
     1035#else
     1036    pScrn->EnableDisableFBAccess(pScrn->scrnIndex, FALSE);
     1037    pScrn->EnableDisableFBAccess(pScrn->scrnIndex, TRUE);
     1038#endif
     1039}
     1040
    10281041static void setSizesAndCursorIntegration(ScrnInfoPtr pScrn, Bool fScreenInitTime)
    10291042{
     
    10411054    /* This calls EnableDisableFBAccess(), so only use when switched in. */
    10421055    if (pScrn->vtSema)
    1043         vbvxReprobeCursor(pScrn);
     1056        reprobeCursor(pScrn);
    10441057}
    10451058
  • trunk/src/VBox/Additions/x11/vboxvideo/vboxvideo.h

    r69075 r69078  
    5454#endif
    5555
     56#include <VBoxVideoVBE.h>
     57
     58#include "xf86.h"
     59#include "xf86str.h"
     60#include "xf86Cursor.h"
     61
    5662#ifdef DEBUG
    5763
    58 #define TRACE_ENTRY() \
    59 do { \
    60     vbvxMsg(RT_GCC_EXTENSION __PRETTY_FUNCTION__); \
    61     vbvxMsg(": entering\n"); \
    62 } while(0)
    63 #define TRACE_EXIT() \
    64 do { \
    65     vbvxMsg(RT_GCC_EXTENSION __PRETTY_FUNCTION__); \
    66     vbvxMsg(": leaving\n"); \
    67 } while(0)
     64#define TRACE_ENTRY() do { xf86ErrorF("%s: entering\n", __func__); } while(0)
     65#define TRACE_EXIT() do { xf86ErrorF("%s: leaving\n", __func__); } while(0)
     66#define TRACE_LINE() \
     67    do { xf86ErrorF("%s: line\n", __func__, __LINE__); } while(0)
    6868#define TRACE_LOG(...) \
    6969do { \
    70     vbvxMsg("%s: ", RT_GCC_EXTENSION __PRETTY_FUNCTION__); \
    71     vbvxMsg(__VA_ARGS__); \
     70    xf86ErrorF("%s: ", __func__); \
     71    xf86ErrorF(__VA_ARGS__); \
    7272} while(0)
    73 # define TRACE_LINE() do \
    74 { \
    75     vbvxMsg("%s: line %d\n", __FUNCTION__, __LINE__); \
    76 } while(0)
     73
    7774#else  /* !DEBUG */
    7875
     
    8784if (!(expr)) \
    8885{ \
    89     vbvxMsg("\nAssertion failed!\n\n"); \
    90     vbvxMsg("%s\n", #expr); \
    91     vbvxMsg("at %s (%s:%d)\n", RT_GCC_EXTENSION __PRETTY_FUNCTION__, __FILE__, __LINE__); \
    92     vbvxMsg out; \
    93     vbvxAbortServer(); \
     86    xf86ErrorF("\nAssertion failed!\n\n"); \
     87    xf86ErrorF("%s\n", #expr); \
     88    xf86ErrorF("at %s (%s:%d)\n", RT_GCC_EXTENSION __PRETTY_FUNCTION__, __FILE__, __LINE__); \
     89    xf86ErrorF out; \
     90    FatalError("Assertion"); \
    9491}
    95 
    96 #include <VBoxVideoVBE.h>
    97 
    98 #include "xf86str.h"
    99 #include "xf86Cursor.h"
    10092
    10193#define VBOX_VERSION            VBOX_VERSION_MAJOR * 10000 \
     
    200192} VBOXRec, *VBOXPtr;
    201193
    202 /* helpers.c */
    203 extern void vbvxMsg(const char *pszFormat, ...);
    204 extern void vbvxMsgV(const char *pszFormat, va_list args);
    205 extern void vbvxAbortServer(void);
    206 extern VBOXPtr vbvxGetRec(ScrnInfoPtr pScrn);
    207 #define VBOXGetRec vbvxGetRec  /* Temporary */
    208 extern int vbvxGetIntegerPropery(ScrnInfoPtr pScrn, char *pszName, size_t *pcData, int32_t **ppaData);
    209 extern void vbvxSetIntegerPropery(ScrnInfoPtr pScrn, char *pszName, size_t cData, int32_t *paData, Bool fSendEvent);
    210 extern void vbvxReprobeCursor(ScrnInfoPtr pScrn);
     194#define VBOXGetRec(pScrn) ((VBOXPtr)(pScrn)->driverPrivate)
    211195
    212196/* setmode.c */
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette