VirtualBox

Changeset 22848 in vbox


Ignore:
Timestamp:
Sep 8, 2009 8:55:36 PM (15 years ago)
Author:
vboxsync
Message:

win guest video: get rid of >= XP functions

Location:
trunk/src/VBox/Additions/WINNT/Graphics
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Graphics/Display/screen.c

    r22592 r22848  
    151151                        0,
    152152                        &returnedDataLength);
     153#ifdef DEBUG_misha
    153154                Assert(!err);
     155#endif
     156                /* this is not fatal, just means Video 2D acceleration will not be supported */
     157                err = 0;
    154158            }
    155159        }
  • trunk/src/VBox/Additions/WINNT/Graphics/Miniport/VBoxHGSMI.h

    r22652 r22848  
    6060typedef union _LARGE_INTEGER *VBOXPLARGE_INTEGER;
    6161
     62typedef enum VBOXVP_POOL_TYPE
     63{
     64    VBoxVpNonPagedPool,
     65    VBoxVpPagedPool,
     66    VBoxVpNonPagedPoolCacheAligned = 4,
     67    VBoxVpPagedPoolCacheAligned
     68} VBOXVP_POOL_TYPE;
     69
    6270#define VBOXNOTIFICATION_EVENT 0x00000001UL
    6371
     
    7987typedef void (*PFNRELEASESPINLOCKFROMDPCLEVEL) (void*  HwDeviceExtension, VBOXPSPIN_LOCK  SpinLock);
    8088
     89typedef void* (*PFNALLOCATEPOOL) (void*  HwDeviceExtension, VBOXVP_POOL_TYPE PoolType, size_t NumberOfBytes, unsigned long Tag);
     90typedef void (*PFNFREEPOOL) (void*  HwDeviceExtension, void*  Ptr);
    8191
    8292/* pfn*SpinLock* functions are available */
     
    8494/* pfn*Event and pfnWaitForSingleObject functions are available */
    8595#define VBOXVIDEOPORTPROCS_EVENT    0x00000002
     96/* pfn*Pool functions are available */
     97#define VBOXVIDEOPORTPROCS_POOL     0x00000004
    8698
    8799typedef struct VBOXVIDEOPORTPROCS
     
    103115    PFNACQUIRESPINLOCKATDPCLEVEL pfnAcquireSpinLockAtDpcLevel;
    104116    PFNRELEASESPINLOCKFROMDPCLEVEL pfnReleaseSpinLockFromDpcLevel;
     117
     118    PFNALLOCATEPOOL pfnAllocatePool;
     119    PFNFREEPOOL pfnFreePool;
    105120} VBOXVIDEOPORTPROCS;
    106121
  • trunk/src/VBox/Additions/WINNT/Graphics/Miniport/VBoxVideoHGSMI.cpp

    r22652 r22848  
    461461}
    462462
     463PVOID vboxAllocatePoolVoid(IN PVOID  HwDeviceExtension, IN VBOXVP_POOL_TYPE  PoolType, IN size_t  NumberOfBytes, IN ULONG  Tag)
     464{
     465    return NULL;
     466}
     467
     468VOID vboxFreePoolVoid(IN PVOID  HwDeviceExtension, IN PVOID  Ptr)
     469{
     470}
     471
    463472void VBoxSetupVideoPortFunctions(PDEVICE_EXTENSION PrimaryExtension, VBOXVIDEOPORTPROCS *pCallbacks, PVIDEO_PORT_CONFIG_INFO pConfigInfo)
    464473{
     
    562571    }
    563572
     573    pCallbacks->pfnAllocatePool = (PFNALLOCATEPOOL)(pConfigInfo->VideoPortGetProcAddress)
     574            (PrimaryExtension,
     575             (PUCHAR)"VideoPortAllocatePool");
     576    Assert(pCallbacks->pfnAllocatePool);
     577
     578    pCallbacks->pfnFreePool = (PFNFREEPOOL)(pConfigInfo->VideoPortGetProcAddress)
     579            (PrimaryExtension,
     580             (PUCHAR)"VideoPortFreePool");
     581    Assert(pCallbacks->pfnFreePool);
     582
     583    if(pCallbacks->pfnAllocatePool
     584            && pCallbacks->pfnFreePool)
     585    {
     586        pCallbacks->fSupportedTypes |= VBOXVIDEOPORTPROCS_POOL;
     587    }
     588    else
     589    {
     590        pCallbacks->pfnAllocatePool = vboxAllocatePoolVoid;
     591        pCallbacks->pfnFreePool = vboxFreePoolVoid;
     592    }
     593
     594#ifdef DEBUG_misha
    564595    Assert(pCallbacks->fSupportedTypes & VBOXVIDEOPORTPROCS_EVENT);
    565596    Assert(pCallbacks->fSupportedTypes & VBOXVIDEOPORTPROCS_SPINLOCK);
     597#endif
    566598}
    567599
     
    9771009static int vboxVBVADeleteChannelContexts(PDEVICE_EXTENSION PrimaryExtension, VBVA_CHANNELCONTEXTS * pContext)
    9781010{
    979     VideoPortFreePool(PrimaryExtension,pContext);
     1011    PrimaryExtension->u.primary.VideoPortProcs.pfnFreePool(PrimaryExtension,pContext);
    9801012        return VINF_SUCCESS;
    9811013}
     
    9851017        uint32_t cDisplays = (uint32_t)PrimaryExtension->u.primary.cDisplays;
    9861018        const size_t size = RT_OFFSETOF(VBVA_CHANNELCONTEXTS, aContexts[cDisplays]);
    987         VBVA_CHANNELCONTEXTS * pContext = (VBVA_CHANNELCONTEXTS*)VideoPortAllocatePool(PrimaryExtension,
    988                 VpNonPagedPool,
     1019        VBVA_CHANNELCONTEXTS * pContext = (VBVA_CHANNELCONTEXTS*)PrimaryExtension->u.primary.VideoPortProcs.pfnAllocatePool(PrimaryExtension,
     1020                VBoxVpNonPagedPool,
    9891021                size,
    9901022                MEM_TAG);
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