VirtualBox

Ignore:
Timestamp:
Aug 29, 2012 3:16:49 PM (12 years ago)
Author:
vboxsync
Message:

Additions/x11/vboxvideo: some header file inclusion clean-up.

Location:
trunk/src/VBox/Additions/x11/vboxvideo
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/x11/vboxvideo/pointer.c

    r38648 r43081  
    2828#include "compiler.h"
    2929#include "cursorstr.h"
     30#include "servermd.h"
    3031
    3132#include "vboxvideo.h"
  • trunk/src/VBox/Additions/x11/vboxvideo/setmode.c

    r36020 r43081  
    5454#endif
    5555#include "vboxvideo.h"
    56 #include <iprt/asm-math.h>
    5756#include "version-generated.h"
    5857#include "product-generated.h"
    59 #include <xf86.h>
    60 #include <misc.h>
    61 
    62 /* All drivers initialising the SW cursor need this */
    63 #include "mipointer.h"
    64 
    65 /* Colormap handling */
    66 #include "micmap.h"
    67 #include "xf86cmap.h"
    68 
    69 /* DPMS */
    70 /* #define DPMS_SERVER
    71 #include "extensions/dpms.h" */
     58#include "xf86.h"
    7259
    7360/* VGA hardware functions for setting and restoring text mode */
  • trunk/src/VBox/Additions/x11/vboxvideo/vboxvideo.c

    r39695 r43081  
    5353# include <string.h>
    5454#endif
     55
     56#include "xf86.h"
     57#include "xf86_OSproc.h"
     58#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 6
     59# include "xf86Resources.h"
     60#endif
     61
     62#ifndef PCIACCESS
     63/* Drivers for PCI hardware need this */
     64# include "xf86PciInfo.h"
     65/* Drivers that need to access the PCI config space directly need this */
     66# include "xf86Pci.h"
     67#endif
     68
     69#include "fb.h"
     70
    5571#include "vboxvideo.h"
    5672#include <iprt/asm-math.h>
     
    110126static void VBOXSaveMode(ScrnInfoPtr pScrn);
    111127static void VBOXRestoreMode(ScrnInfoPtr pScrn);
     128
     129static inline void VBOXSetRec(ScrnInfoPtr pScrn)
     130{
     131    if (!pScrn->driverPrivate)
     132        pScrn->driverPrivate = calloc(sizeof(VBOXRec), 1);
     133}
    112134
    113135enum GenericTypes
     
    583605                                NULL, NULL, NULL, NULL, NULL);
    584606    if (pScrn != NULL) {
    585         VBOXPtr pVBox = VBOXGetRec(pScrn);
    586 
     607        VBOXPtr pVBox;
     608
     609        VBOXSetRec(pScrn);
     610        pVBox = VBOXGetRec(pScrn);
     611        if (!pVBox)
     612            return FALSE;
    587613        pScrn->driverVersion = VBOX_VERSION;
    588614        pScrn->driverName    = VBOX_DRIVER_NAME;
     
    678704{
    679705    ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
     706   
    680707    VBOXPtr pVBox = VBOXGetRec(pScrn);
    681708
    682709    TRACE_LOG("enable=%s\n", enable ? "TRUE" : "FALSE");
     710    VBOXSetRec(pScrn);
    683711    pVBox->accessEnabled = enable;
    684712    pVBox->EnableDisableFBAccess(scrnIndex, enable);
     
    728756
    729757    /* Get our private data from the ScrnInfoRec structure. */
     758    VBOXSetRec(pScrn);
    730759    pVBox = VBOXGetRec(pScrn);
    731760    if (!pVBox)
  • trunk/src/VBox/Additions/x11/vboxvideo/vboxvideo.h

    r36020 r43081  
    5555#include <VBox/VBoxVideoGuest.h>
    5656#include <VBox/VBoxVideo.h>
    57 
    58 #include <iprt/asm-math.h>
    5957
    6058#ifdef DEBUG
     
    102100#include <VBox/VMMDev.h>
    103101
    104 /* All drivers should typically include these */
    105 #include "xf86.h"
    106 #include "xf86_OSproc.h"
    107 #if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 6
    108 # include "xf86Resources.h"
    109 #endif
    110 
    111 #include <iprt/string.h>
    112 #include "compiler.h"
    113 
    114 #ifndef PCIACCESS
    115 /* Drivers for PCI hardware need this */
    116 # include "xf86PciInfo.h"
    117 /* Drivers that need to access the PCI config space directly need this */
    118 # include "xf86Pci.h"
    119 #endif
    120 
    121 /* ShadowFB support */
    122 #include "shadowfb.h"
    123 
    124 /* Dga definitions */
    125 #include "dgaproc.h"
    126 
    127 #if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 6
    128 # include "xf86RAC.h"
    129 #endif
    130 
    131 #include "fb.h"
     102#include "xf86str.h"
     103#include "xf86Cursor.h"
    132104
    133105#define VBOX_VERSION            4000  /* Why? */
    134 #include "xf86Cursor.h"
    135106#define VBOX_NAME                     "VBoxVideo"
    136107#define VBOX_DRIVER_NAME          "vboxvideo"
     
    278249static inline VBOXPtr VBOXGetRec(ScrnInfoPtr pScrn)
    279250{
    280     if (!pScrn->driverPrivate)
    281     {
    282         pScrn->driverPrivate = calloc(sizeof(VBOXRec), 1);
    283     }
    284 
    285251    return ((VBOXPtr)pScrn->driverPrivate);
    286252}
     
    302268static inline int32_t vboxDisplayPitch(ScrnInfoPtr pScrn, int32_t cbLine)
    303269{
    304     return ASMDivU64ByU32RetU32((uint64_t)cbLine * 8, vboxBPP(pScrn));
     270    return (int32_t)((uint64_t)cbLine * 8 / vboxBPP(pScrn));
    305271}
    306272
  • trunk/src/VBox/Additions/x11/vboxvideo/vboxvideo_dri.c

    r35268 r43081  
    4747 */
    4848
     49#include "xf86.h"
    4950#include "vboxvideo.h"
    5051#ifndef PCIACCESS
  • trunk/src/VBox/Additions/x11/vboxvideo/vbva.c

    r35932 r43081  
    2727#include <iprt/string.h>
    2828#include "compiler.h"
     29
     30/* ShadowFB support */
     31#include "shadowfb.h"
    2932
    3033#include "vboxvideo.h"
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