VirtualBox

Ignore:
Timestamp:
Jun 15, 2010 10:31:34 PM (15 years ago)
Author:
vboxsync
Message:

wddm/2d: overlay create/update in UMD

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Graphics/Miniport/wddm/VBoxVideoIf.h

    r29966 r30215  
    108108} VBOXVHWA_INFO;
    109109
     110#define VBOXWDDM_OVERLAY_F_CKEY_DST      0x00000001
     111#define VBOXWDDM_OVERLAY_F_CKEY_DSTRANGE 0x00000002
     112#define VBOXWDDM_OVERLAY_F_CKEY_SRC      0x00000004
     113#define VBOXWDDM_OVERLAY_F_CKEY_SRCRANGE 0x00000008
     114#define VBOXWDDM_OVERLAY_F_BOB           0x00000010
     115#define VBOXWDDM_OVERLAY_F_INTERLEAVED   0x00000020
     116#define VBOXWDDM_OVERLAY_F_MIRROR_LR     0x00000040
     117#define VBOXWDDM_OVERLAY_F_MIRROR_UD     0x00000080
     118#define VBOXWDDM_OVERLAY_F_DEINTERLACED  0x00000100
     119
     120typedef struct VBOXWDDM_OVERLAY_DESC
     121{
     122    uint32_t fFlags;
     123    UINT DstColorKeyLow;
     124    UINT DstColorKeyHigh;
     125    UINT SrcColorKeyLow;
     126    UINT SrcColorKeyHigh;
     127} VBOXWDDM_OVERLAY_DESC, *PVBOXWDDM_OVERLAY_DESC;
     128
     129/* the dirty rect info is valid */
     130#define VBOXWDDM_DIRTYREGION_F_VALID      0x00000001
     131#define VBOXWDDM_DIRTYREGION_F_RECT_VALID 0x00000002
     132
     133typedef struct VBOXWDDM_DIRTYREGION
     134{
     135    uint32_t fFlags; /* <-- see VBOXWDDM_DIRTYREGION_F_xxx flags above */
     136    RECT Rect;
     137} VBOXWDDM_DIRTYREGION, *PVBOXWDDM_DIRTYREGION;
     138
     139typedef struct VBOXWDDM_OVERLAY_INFO
     140{
     141    VBOXWDDM_OVERLAY_DESC OverlayDesc;
     142    VBOXWDDM_DIRTYREGION DirtyRegion; /* <- the dirty region of the overlay surface */
     143} VBOXWDDM_OVERLAY_INFO, *PVBOXWDDM_OVERLAY_INFO;
     144
     145typedef struct VBOXWDDM_OVERLAYFLIP_INFO
     146{
     147    VBOXWDDM_DIRTYREGION DirtyRegion; /* <- the dirty region of the overlay surface */
     148} VBOXWDDM_OVERLAYFLIP_INFO, *PVBOXWDDM_OVERLAYFLIP_INFO;
     149
    110150/* query info func */
    111151typedef struct VBOXWDDM_QI
     
    195235}
    196236
     237DECLINLINE(void) vboxWddmRectUnite(RECT *pR, const RECT *pR2Unite)
     238{
     239    pR->left = RT_MIN(pR->left, pR2Unite->left);
     240    pR->top = RT_MIN(pR->top, pR2Unite->top);
     241    pR->right = RT_MAX(pR->right, pR2Unite->right);
     242    pR->bottom = RT_MAX(pR->bottom, pR2Unite->bottom);
     243}
     244
     245DECLINLINE(void) vboxWddmDirtyRegionAddRect(PVBOXWDDM_DIRTYREGION pInfo, const RECT *pRect)
     246{
     247    if (!(pInfo->fFlags & VBOXWDDM_DIRTYREGION_F_VALID))
     248    {
     249        pInfo->fFlags = VBOXWDDM_DIRTYREGION_F_VALID;
     250        if (pRect)
     251        {
     252            pInfo->fFlags |= VBOXWDDM_DIRTYREGION_F_RECT_VALID;
     253            pInfo->Rect = *pRect;
     254        }
     255    }
     256    else if (!!(pInfo->fFlags & VBOXWDDM_DIRTYREGION_F_RECT_VALID))
     257    {
     258        if (pRect)
     259            vboxWddmRectUnite(&pInfo->Rect, pRect);
     260        else
     261            pInfo->fFlags &= ~VBOXWDDM_DIRTYREGION_F_RECT_VALID;
     262    }
     263}
     264
     265DECLINLINE(void) vboxWddmDirtyRegionUnite(PVBOXWDDM_DIRTYREGION pInfo, const PVBOXWDDM_DIRTYREGION pInfo2)
     266{
     267    if (pInfo2->fFlags & VBOXWDDM_DIRTYREGION_F_VALID)
     268    {
     269        if (pInfo2->fFlags & VBOXWDDM_DIRTYREGION_F_RECT_VALID)
     270            vboxWddmDirtyRegionAddRect(pInfo, &pInfo2->Rect);
     271        else
     272            vboxWddmDirtyRegionAddRect(pInfo, NULL);
     273    }
     274}
     275
     276DECLINLINE(void) vboxWddmDirtyRegionClear(PVBOXWDDM_DIRTYREGION pInfo)
     277{
     278    pInfo->fFlags = 0;
     279}
     280
    197281#endif /* #ifndef ___VBoxVideoIf_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