2023-04-09 02:16:33 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <Windows.h>
|
|
|
|
#include <wdf.h>
|
|
|
|
#include <IddCx.h>
|
|
|
|
|
|
|
|
#include <memory>
|
2023-04-11 06:55:58 +00:00
|
|
|
#include "CIndirectDeviceContext.h"
|
2023-04-09 02:16:33 +00:00
|
|
|
#include "CSwapChainProcessor.h"
|
|
|
|
|
|
|
|
class CIndirectMonitorContext
|
|
|
|
{
|
|
|
|
protected:
|
|
|
|
IDDCX_MONITOR m_monitor;
|
2023-04-11 06:55:58 +00:00
|
|
|
CIndirectDeviceContext * m_devContext;
|
2023-04-09 02:16:33 +00:00
|
|
|
std::unique_ptr<CSwapChainProcessor> m_thread;
|
|
|
|
|
|
|
|
public:
|
2023-04-11 06:55:58 +00:00
|
|
|
CIndirectMonitorContext(_In_ IDDCX_MONITOR monitor, CIndirectDeviceContext * device);
|
2023-04-09 02:16:33 +00:00
|
|
|
|
|
|
|
virtual ~CIndirectMonitorContext();
|
|
|
|
|
|
|
|
void AssignSwapChain(IDDCX_SWAPCHAIN swapChain, LUID renderAdapter, HANDLE newFrameEvent);
|
|
|
|
void UnassignSwapChain();
|
|
|
|
};
|
|
|
|
|
|
|
|
struct CIndirectMonitorContextWrapper
|
|
|
|
{
|
|
|
|
CIndirectMonitorContext* context;
|
|
|
|
|
|
|
|
void Cleanup()
|
|
|
|
{
|
|
|
|
delete context;
|
|
|
|
context = nullptr;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
WDF_DECLARE_CONTEXT_TYPE(CIndirectMonitorContextWrapper);
|