VirtualBox

Changeset 56431 in vbox


Ignore:
Timestamp:
Jun 15, 2015 1:50:23 PM (10 years ago)
Author:
vboxsync
Message:

Windows guest additions, VBVA: reverted part of r100972: host mouse cursor capability, other fixes remain.

Location:
trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/VBoxVideo.h

    r56378 r56431  
    933933/** Returns the max size of VBVA record. */
    934934#define VBOX_VBVA_CONF32_MAX_RECORD_SIZE 6
    935 /** The host mouse cursor capabilities: VBVA_MOUSE_CURSOR_*. */
    936 #define VBOX_VBVA_CONF32_MOUSE_CURSOR 7
    937 
    938 #define VBVA_MOUSE_CURSOR_NO_XOR 0x00000001
    939935
    940936typedef struct VBVACONF32
  • trunk/include/VBox/VBoxVideoGuest.h

    r56378 r56431  
    292292RTDECL(bool)     VBoxVideoAnyWidthAllowed(void);
    293293RTDECL(uint16_t) VBoxHGSMIGetScreenFlags(PHGSMIGUESTCOMMANDCONTEXT pCtx);
    294 RTDECL(uint32_t) VBoxHGSMIGetMouseCursorFlags(PHGSMIGUESTCOMMANDCONTEXT pCtx);
    295294
    296295struct VBVAINFOVIEW;
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/common/VBoxMPCommon.cpp

    r56378 r56431  
    1919#include "VBoxMPCommon.h"
    2020#include <VBox/Hardware/VBoxVideoVBE.h>
    21 #include <iprt/asm.h>
    2221
    2322int VBoxMPCmnMapAdapterMemory(PVBOXMP_COMMON pCommon, void **ppv, uint32_t ulOffset, uint32_t ulSize)
     
    108107}
    109108
    110 static bool vboxMPCmnIsXorPointer(uint32_t fFlags,
    111                                   uint32_t cWidth,
    112                                   uint32_t cHeight,
    113                                   const uint8_t *pu8Pixels,
    114                                   uint32_t cbLength)
    115 {
    116     if (   (fFlags & VBOX_MOUSE_POINTER_SHAPE) == 0
    117         || (fFlags & VBOX_MOUSE_POINTER_ALPHA) != 0)
    118    
    119     {
    120         return false;
    121     }
    122 
    123     if (cWidth > 8192 || cHeight > 8192)
    124     {
    125         /* Not supported cursor size. */
    126         return false;
    127     }
    128 
    129     /* Pointer data consists of AND mask and XOR_MASK */
    130     const uint32_t cbAndLine = (cWidth + 7) / 8;
    131     const uint32_t cbAndMask = ((cbAndLine * cHeight + 3) & ~3);
    132     const uint32_t cbXorMask = cWidth * 4 * cHeight;
    133 
    134     if (cbAndMask + cbXorMask > cbLength)
    135     {
    136         return false;
    137     }
    138 
    139     /* If AND mask contains only 1, then it is a XOR only cursor. */
    140     bool fXorOnly = true;
    141     const uint8_t *pu8AndLine = &pu8Pixels[0];
    142     uint32_t i;
    143     for (i = 0; i < cHeight; ++i)
    144     {
    145         if (ASMBitFirstClear(pu8AndLine, cWidth) != -1)
    146         {
    147             fXorOnly = false;
    148             break;
    149         }
    150         pu8AndLine += cbAndLine;
    151     }
    152 
    153     return fXorOnly;
    154 }
    155 
    156109bool VBoxMPCmnUpdatePointerShape(PVBOXMP_COMMON pCommon, PVIDEO_POINTER_ATTRIBUTES pAttrs, uint32_t cbLength)
    157110{
     
    163116    uint8_t *pPixels = &pAttrs->Pixels[0];
    164117
    165     if (pCommon->u32MouseCursorFlags & VBVA_MOUSE_CURSOR_NO_XOR)
    166     {
    167         if (vboxMPCmnIsXorPointer(fFlags,
    168                                   cWidth, cHeight, pPixels,
    169                                   cbLength - sizeof(VIDEO_POINTER_ATTRIBUTES)))
    170         {
    171             return false;
    172         }
    173     }
    174 
    175118    int rc = VBoxHGSMIUpdatePointerShape(&pCommon->guestCtx,
    176119                                         fFlags, cHotX, cHotY,
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/common/VBoxMPDevExt.h

    r56378 r56431  
    6767
    6868    BOOLEAN fAnyX;                      /* Unrestricted horizontal resolution flag. */
    69 
    70     uint32_t u32MouseCursorFlags;       /* VBVA_MOUSE_CURSOR_* */
    7169} VBOXMP_COMMON, *PVBOXMP_COMMON;
    7270
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPWddm.cpp

    r56378 r56431  
    11351135                if (VBoxCommonFromDeviceExt(pDevExt)->bHGSMI)
    11361136                {
    1137                     PVBOXMP_COMMON pCommon = VBoxCommonFromDeviceExt(pDevExt);
    1138                     pCommon->u32MouseCursorFlags = VBoxHGSMIGetMouseCursorFlags(&pCommon->guestCtx);
    1139 
    11401137                    vboxWddmSetupDisplays(pDevExt);
    11411138                    if (!VBoxCommonFromDeviceExt(pDevExt)->bHGSMI)
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/xpdm/VBoxMPDriver.cpp

    r56378 r56431  
    149149    VBoxSetupDisplaysHGSMI(&pExt->u.primary.commonInfo, phVRAM, ulApertureSize, cbVRAM, 0);
    150150
    151     PVBOXMP_COMMON pCommon = &pExt->u.primary.commonInfo;
    152     if (pCommon->bHGSMI)
    153     {
    154         pCommon->u32MouseCursorFlags = VBoxHGSMIGetMouseCursorFlags(&pCommon->guestCtx);
    155     }
    156 
    157151    /* Check if the chip restricts horizontal resolution or not.
    158152     * Must be done after VBoxSetupDisplaysHGSMI, because it initializes the common structure.
  • trunk/src/VBox/Additions/common/VBoxVideo/Modesetting.cpp

    r56378 r56431  
    379379    return (uint16_t)u32Flags;
    380380}
    381 
    382 
    383 /**
    384  * Query the mouse cursor flags VBVA_MOUSE_CURSOR_*.
    385  *
    386  * @returns The mask of VBVA_MOUSE_CURSOR_* flags or 0 if host does not support the request.
    387  * @param  pCtx  the context containing the heap to use
    388  */
    389 RTDECL(uint32_t) VBoxHGSMIGetMouseCursorFlags(PHGSMIGUESTCOMMANDCONTEXT pCtx)
    390 {
    391     uint32_t u32Flags = 0;
    392     int rc = VBoxQueryConfHGSMIDef(pCtx, VBOX_VBVA_CONF32_MOUSE_CURSOR, 0, &u32Flags);
    393     LogFunc(("u32Flags = 0x%x rc %Rrc\n", u32Flags, rc));
    394     if (RT_FAILURE(rc))
    395         u32Flags = 0;
    396     return u32Flags;
    397 }
  • trunk/src/VBox/Devices/Graphics/DevVGA_VBVA.cpp

    r56378 r56431  
    840840
    841841        Log(("                  VBVA o 0x%x p %p\n",
    842               pView->u32VBVAOffset,
     842              pView->vbva.u32VBVAOffset,
    843843              pView->vbva.guest.pVBVA));
    844844
    845845        Log(("                  PR cb 0x%x p %p\n",
    846               pView->partialRecord.cb,
    847               pView->partialRecord.pu8));
     846              pView->vbva.partialRecord.cb,
     847              pView->vbva.partialRecord.pu8));
    848848    }
    849849
     
    21152115        pConf32->u32Value = VBVA_MAX_RECORD_SIZE;
    21162116    }
    2117     else if (u32Index == VBOX_VBVA_CONF32_MOUSE_CURSOR)
    2118     {
    2119 #if defined(RT_OS_WINDOWS) || defined(RT_OS_OS2)
    2120         pConf32->u32Value = 0;
    2121 #else
    2122         pConf32->u32Value = VBVA_MOUSE_CURSOR_NO_XOR;
    2123 #endif
    2124     }
    21252117    else
    21262118    {
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