Condividi tramite


funzione D3DKMDT_VPPR_GET_OFFSET_ROTATION (d3dkmdt.h)

Funzione helper che estrae l'angolo di offset da un determinato valore dell'enumerazione D3DKMDT_VIDPN_PRESENT_PATH_ROTATION . Solo i driver che supportano la rotazione indipendente dal percorso (DXGKDDI_INTERFACE_VERSION = DXGKDDI_INTERFACE_VERSION_WDDM1_3_PATH_INDEPENDENT_ROTATION >) devono chiamare questa funzione.

Sintassi

D3DKMDT_VIDPN_PRESENT_PATH_ROTATION D3DKMDT_VPPR_GET_OFFSET_ROTATION(
  D3DKMDT_VIDPN_PRESENT_PATH_ROTATION Rotation
);

Parametri

Rotation

In input, un valore dell'enumerazione D3DKMDT_VIDPN_PRESENT_PATH_ROTATION .

In output, un valore compreso tra 1 e 4, inclusivo, che corrisponde alla parte OFFSET dei valori costanti D3DKMDT_VIDPN_PRESENT_PATH_ROTATION . Un valore di output pari a 1 (identità) rappresenta 0 gradi di offset, 2 rappresenta 90 gradi e così via. Un valore di output pari a 0 indica che il percorso VidPN non viene inizializzato.

Il valore di output è sempre uno dei valori supportati specificati per questo percorso nella struttura D3DKMDT_VIDPN_PRESENT_PATH_ROTATION_SUPPORT .

Valore restituito

Il valore restituito corrisponde all'angolo di offset come indicato di seguito:

Valore di enumerazione di input Costante di enumerazione di input Offset in gradi Valore di rotazione dell'output
0 D3DKMDT_VPPR_UNINITIALIZED - 0
1 D3DKMDT_VPPR_IDENTITY 0 1
2 D3DKMDT_VPPR_ROTATE90 0 1
3 D3DKMDT_VPPR_ROTATE180 0 1
4 D3DKMDT_VPPR_ROTATE270 0 1
5 D3DKMDT_VPPR_IDENTITY_OFFSET90 90 2
6 D3DKMDT_VPPR_ROTATE90_OFFSET90 90 2
7 D3DKMDT_VPPR_ROTATE180_OFFSET90 90 2
8 D3DKMDT_VPPR_ROTATE270_OFFSET90 90 2
9 D3DKMDT_VPPR_IDENTITY_OFFSET180 180 3
10 D3DKMDT_VPPR_ROTATE90_OFFSET180 180 3
11 D3DKMDT_VPPR_ROTATE180_OFFSET180 180 3
12 D3DKMDT_VPPR_ROTATE270_OFFSET180 180 3
13 D3DKMDT_VPPR_IDENTITY_OFFSET270 270 4
14 D3DKMDT_VPPR_ROTATE90_OFFSET270 270 4
15 D3DKMDT_VPPR_ROTATE180_OFFSET270 270 4
16 D3DKMDT_VPPR_ROTATE270_OFFSET270 270 4

Commenti

Questa funzione è dichiarata inline in D3dkmdt.h come:

__inline
D3DKMDT_VIDPN_PRESENT_PATH_ROTATION 
    D3DKMDT_VPPR_GET_OFFSET_ROTATION(
        D3DKMDT_VIDPN_PRESENT_PATH_ROTATION Rotation)
{
    if ((Rotation >= D3DKMDT_VPPR_IDENTITY) &&
        (Rotation <= D3DKMDT_VPPR_ROTATE270_OFFSET270))
    {
        Rotation = (D3DKMDT_VIDPN_PRESENT_PATH_ROTATION)(
            ((Rotation - 1) / 4) + 1);
    }
    return Rotation;
}

Il driver deve usare il valore di output del parametro Rotation per ruotare il contenuto del percorso clone secondario quando Desktop Window Manager (DWM) ha già ruotato il contenuto del percorso clone primario. Per altre informazioni, vedere Supporto Path-Independent rotazione.

Requisiti

Requisito Valore
Client minimo supportato Windows 8.1,DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM1_3_PATH_INDEPENDENT_ROTATION
Server minimo supportato Windows Server 2012 R2
Piattaforma di destinazione Desktop
Intestazione d3dkmdt.h

Vedi anche

D3DKMDT_VIDPN_PRESENT_PATH_ROTATION

D3DKMDT_VIDPN_PRESENT_PATH_ROTATION_SUPPORT