-
Notifications
You must be signed in to change notification settings - Fork 0
/
DisplayManager.h
46 lines (40 loc) · 2.07 KB
/
DisplayManager.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
// PARTICULAR PURPOSE.
//
// Copyright (c) Microsoft Corporation. All rights reserved
#ifndef _DISPLAYMANAGER_H_
#define _DISPLAYMANAGER_H_
#include "CommonTypes.h"
//
// Handles the task of processing frames
//
class DISPLAYMANAGER
{
public:
DISPLAYMANAGER();
~DISPLAYMANAGER();
void InitD3D(DX_RESOURCES* Data);
//ID3D11Device* GetDevice();
DUPL_RETURN ProcessFrame(_In_ FRAME_DATA* Data, _Inout_ ID3D11Texture2D* SharedSurf, INT OffsetX, INT OffsetY, _In_ DXGI_OUTPUT_DESC* DeskDesc);
void CleanRefs();
private:
// methods
DUPL_RETURN CopyDirty(_In_ ID3D11Texture2D* SrcSurface, _Inout_ ID3D11Texture2D* SharedSurf, _In_reads_(DirtyCount) RECT* DirtyBuffer, UINT DirtyCount, INT OffsetX, INT OffsetY, _In_ DXGI_OUTPUT_DESC* DeskDesc);
DUPL_RETURN CopyMove(_Inout_ ID3D11Texture2D* SharedSurf, _In_reads_(MoveCount) DXGI_OUTDUPL_MOVE_RECT* MoveBuffer, UINT MoveCount, INT OffsetX, INT OffsetY, _In_ DXGI_OUTPUT_DESC* DeskDesc, INT TexWidth, INT TexHeight);
void SetDirtyVert(_Out_writes_(NUMVERTICES) VERTEX* Vertices, _In_ RECT* Dirty, INT OffsetX, INT OffsetY, _In_ DXGI_OUTPUT_DESC* DeskDesc, _In_ D3D11_TEXTURE2D_DESC* FullDesc, _In_ D3D11_TEXTURE2D_DESC* ThisDesc);
void SetMoveRect(_Out_ RECT* SrcRect, _Out_ RECT* DestRect, _In_ DXGI_OUTPUT_DESC* DeskDesc, _In_ DXGI_OUTDUPL_MOVE_RECT* MoveRect, INT TexWidth, INT TexHeight);
// variables
ID3D11Device* m_Device;
ID3D11DeviceContext* m_DeviceContext;
ID3D11Texture2D* m_MoveSurf;
ID3D11VertexShader* m_VertexShader;
ID3D11PixelShader* m_PixelShader;
ID3D11InputLayout* m_InputLayout;
ID3D11RenderTargetView* m_RTV;
ID3D11SamplerState* m_SamplerLinear;
BYTE* m_DirtyVertexBufferAlloc;
UINT m_DirtyVertexBufferAllocSize;
};
#endif