mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-08-09 20:24:14 +00:00
[host] added multi-threaded memcopy for high resolutions
This commit is contained in:
@@ -21,7 +21,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
using namespace Capture;
|
||||
|
||||
#include "common/debug.h"
|
||||
#include "common/memcpySSE.h"
|
||||
|
||||
DXGI::DXGI() :
|
||||
m_options(NULL),
|
||||
@@ -33,11 +32,11 @@ DXGI::DXGI() :
|
||||
m_texture(),
|
||||
m_pointer(NULL)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
DXGI::~DXGI()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool DXGI::Initialize(CaptureOptions * options)
|
||||
@@ -310,7 +309,7 @@ GrabStatus DXGI::GrabFrame(FrameInfo & frame)
|
||||
frame.stride = m_mapping.RowPitch / 4;
|
||||
|
||||
unsigned int size = m_height * m_mapping.RowPitch;
|
||||
memcpySSE(frame.buffer, m_mapping.pData, size < frame.bufferSize ? size : frame.bufferSize);
|
||||
m_memcpy.Copy(frame.buffer, m_mapping.pData, size < frame.bufferSize ? size : frame.bufferSize);
|
||||
return GRAB_STATUS_OK;
|
||||
}
|
||||
|
||||
@@ -448,7 +447,7 @@ GrabStatus DXGI::GrabFrame(FrameInfo & frame)
|
||||
frame.stride = m_mapping.RowPitch / 4;
|
||||
unsigned int size = m_height * m_mapping.RowPitch;
|
||||
|
||||
memcpySSE(frame.buffer, m_mapping.pData, size < frame.bufferSize ? size : frame.bufferSize);
|
||||
m_memcpy.Copy(frame.buffer, m_mapping.pData, size < frame.bufferSize ? size : frame.bufferSize);
|
||||
|
||||
return GRAB_STATUS_OK;
|
||||
}
|
@@ -20,6 +20,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#pragma once
|
||||
|
||||
#include "ICapture.h"
|
||||
#include "MultiMemcpy.h"
|
||||
|
||||
#define W32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
@@ -75,6 +76,7 @@ namespace Capture
|
||||
unsigned int m_width;
|
||||
unsigned int m_height;
|
||||
|
||||
MultiMemcpy m_memcpy;
|
||||
IDXGIFactory1Ptr m_dxgiFactory;
|
||||
ID3D11DevicePtr m_device;
|
||||
D3D_FEATURE_LEVEL m_featureLevel;
|
||||
|
Reference in New Issue
Block a user