mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-08-06 10:44:01 +00:00
[idd] initial indirect driver with Looking Glass monitor
This commit is contained in:
36
idd/LGIdd/CIndirectMonitorContext.h
Normal file
36
idd/LGIdd/CIndirectMonitorContext.h
Normal file
@@ -0,0 +1,36 @@
|
||||
#pragma once
|
||||
|
||||
#include <Windows.h>
|
||||
#include <wdf.h>
|
||||
#include <IddCx.h>
|
||||
|
||||
#include <memory>
|
||||
#include "CSwapChainProcessor.h"
|
||||
|
||||
class CIndirectMonitorContext
|
||||
{
|
||||
protected:
|
||||
IDDCX_MONITOR m_monitor;
|
||||
std::unique_ptr<CSwapChainProcessor> m_thread;
|
||||
|
||||
public:
|
||||
CIndirectMonitorContext(_In_ IDDCX_MONITOR monitor);
|
||||
|
||||
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);
|
Reference in New Issue
Block a user