VirtualBox

Changeset 63822 in vbox for trunk


Ignore:
Timestamp:
Sep 14, 2016 6:18:20 AM (8 years ago)
Author:
vboxsync
Message:

include,Main,DevVGA: bugref:8387: support for guest request to blank the virtual monitor (VBVA_SCREEN_F_BLANK2)

Location:
trunk
Files:
4 edited

Legend:

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

    r63646 r63822  
    994994 * out by the host. */
    995995#define VBVA_SCREEN_F_BLANK    0x0004
     996/** The virtual monitor has been blanked by the guest and should be blacked
     997 * out by the host using the previous mode values for width. height, etc. */
     998#define VBVA_SCREEN_F_BLANK2   0x0008
    996999
    9971000typedef struct VBVAINFOSCREEN
  • trunk/src/VBox/Devices/Graphics/DevVGA_VBVA.cpp

    r63562 r63822  
    21372137    else if (u32Index == VBOX_VBVA_CONF32_SCREEN_FLAGS)
    21382138    {
    2139         pConf32->u32Value = VBVA_SCREEN_F_ACTIVE | VBVA_SCREEN_F_DISABLED | VBVA_SCREEN_F_BLANK;
     2139        pConf32->u32Value =  VBVA_SCREEN_F_ACTIVE
     2140                           | VBVA_SCREEN_F_DISABLED
     2141                           | VBVA_SCREEN_F_BLANK
     2142                           | VBVA_SCREEN_F_BLANK2;
    21402143    }
    21412144    else if (u32Index == VBOX_VBVA_CONF32_MAX_RECORD_SIZE)
  • trunk/src/VBox/Devices/Graphics/DevVGA_VDMA.cpp

    r63562 r63822  
    14761476{
    14771477    const uint32_t u32ViewIndex = pScreen->u32ViewIndex;
    1478     const bool fDisabled = RT_BOOL(pScreen->u16Flags & VBVA_SCREEN_F_DISABLED);
    1479 
    1480     if (fDisabled)
     1478    const uint16_t u16Flags = pScreen->u16Flags;
     1479
     1480    if (u16Flags & VBVA_SCREEN_F_DISABLED)
    14811481    {
    14821482        if (   u32ViewIndex < pVGAState->cMonitors
     
    14911491    else
    14921492    {
     1493        if (u16Flags & VBVA_SCREEN_F_BLANK2)
     1494        {
     1495            /* Special case for blanking using current video mode.
     1496             * Only 'u16Flags' field is relevant.
     1497             */
     1498            RT_ZERO(*pScreen);
     1499            pScreen->u16Flags = u16Flags;
     1500            return VINF_SUCCESS;
     1501        }
     1502
    14931503        if (   u32ViewIndex < pVGAState->cMonitors
    14941504            && pScreen->u16BitsPerPixel <= 32
     
    15611571            continue;
    15621572
    1563         if (!fDisable || !CurView.u32ViewSize)
     1573        /* The view does not change if _BLANK2 is set. */
     1574        if (   (!fDisable || !CurView.u32ViewSize)
     1575            && !RT_BOOL(Screen.u16Flags & VBVA_SCREEN_F_BLANK2))
    15641576        {
    15651577            View.u32ViewIndex = Screen.u32ViewIndex;
  • trunk/src/VBox/Main/src-client/DisplayImpl.cpp

    r63606 r63822  
    40724072    }
    40734073
     4074    VBVAINFOSCREEN screenInfo;
     4075    RT_ZERO(screenInfo);
     4076
     4077    if (pScreen->u16Flags & VBVA_SCREEN_F_BLANK2)
     4078    {
     4079        /* Init a local VBVAINFOSCREEN structure, which will be used instead of
     4080         * the original pScreen. Set VBVA_SCREEN_F_BLANK, which will force
     4081         * the code below to choose the "blanking" branches.
     4082         */
     4083        screenInfo.u32ViewIndex    = pScreen->u32ViewIndex;
     4084        screenInfo.i32OriginX      = pFBInfo->xOrigin;
     4085        screenInfo.i32OriginY      = pFBInfo->yOrigin;
     4086        screenInfo.u32StartOffset  = 0; /* Irrelevant */
     4087        screenInfo.u32LineSize     = pFBInfo->u32LineSize;
     4088        screenInfo.u32Width        = pFBInfo->w;
     4089        screenInfo.u32Height       = pFBInfo->h;
     4090        screenInfo.u16BitsPerPixel = pFBInfo->u16BitsPerPixel;
     4091        screenInfo.u16Flags        = pScreen->u16Flags | VBVA_SCREEN_F_BLANK;
     4092
     4093        pScreen = &screenInfo;
     4094    }
     4095
    40744096    /* If display was disabled or there is no framebuffer, a resize will be required,
    40754097     * because the framebuffer was/will be changed.
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