LookingGlass/idd/LGIdd/CIndirectMonitorContext.h
Geoffrey McRae 0c3dce3ca6 [idd] implemented frame feed from the guest (very hacky)
This is NOT READY for general consumption, if you decide to make
use of this driver, DO NOT ASK FOR SUPPORT.
2023-04-11 16:55:58 +10:00

38 lines
790 B
C++

#pragma once
#include <Windows.h>
#include <wdf.h>
#include <IddCx.h>
#include <memory>
#include "CIndirectDeviceContext.h"
#include "CSwapChainProcessor.h"
class CIndirectMonitorContext
{
protected:
IDDCX_MONITOR m_monitor;
CIndirectDeviceContext * m_devContext;
std::unique_ptr<CSwapChainProcessor> m_thread;
public:
CIndirectMonitorContext(_In_ IDDCX_MONITOR monitor, CIndirectDeviceContext * device);
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);