remove unnecessary logs.
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -135,8 +135,6 @@ void Duplicator::CheckUnityAdapter()
|
||||
|
||||
void Duplicator::Start()
|
||||
{
|
||||
Debug::Log(__FUNCTION__);
|
||||
|
||||
if (state_ != State::Ready) return;
|
||||
|
||||
Stop();
|
||||
@@ -182,8 +180,6 @@ void Duplicator::Start()
|
||||
|
||||
void Duplicator::Stop()
|
||||
{
|
||||
Debug::Log(__FUNCTION__);
|
||||
|
||||
shouldRun_ = false;
|
||||
|
||||
if (thread_.joinable())
|
||||
@@ -240,8 +236,6 @@ const Duplicator::Frame& Duplicator::GetLastFrame() const
|
||||
|
||||
void Duplicator::Duplicate(UINT timeout)
|
||||
{
|
||||
Debug::Log(__FUNCTION__);
|
||||
|
||||
if (!dupl_ || !device_) return;
|
||||
|
||||
Release();
|
||||
@@ -363,8 +357,6 @@ void Duplicator::UpdateCursor(
|
||||
const ComPtr<ID3D11Texture2D>& texture,
|
||||
const DXGI_OUTDUPL_FRAME_INFO& frameInfo)
|
||||
{
|
||||
Debug::Log(__FUNCTION__);
|
||||
|
||||
auto& manager = GetMonitorManager();
|
||||
|
||||
if (frameInfo.PointerPosition.Visible)
|
||||
@@ -383,8 +375,6 @@ void Duplicator::UpdateCursor(
|
||||
|
||||
void Duplicator::UpdateMetadata(UINT totalBufferSize)
|
||||
{
|
||||
Debug::Log(__FUNCTION__);
|
||||
|
||||
metaData_.buffer.ExpandIfNeeded(totalBufferSize);
|
||||
if (!metaData_.buffer.Empty())
|
||||
{
|
||||
@@ -396,8 +386,6 @@ void Duplicator::UpdateMetadata(UINT totalBufferSize)
|
||||
|
||||
void Duplicator::UpdateMoveRects()
|
||||
{
|
||||
Debug::Log(__FUNCTION__);
|
||||
|
||||
const auto hr = dupl_->GetFrameMoveRects(
|
||||
metaData_.buffer.Size(),
|
||||
metaData_.buffer.As<DXGI_OUTDUPL_MOVE_RECT>(),
|
||||
@@ -440,8 +428,6 @@ void Duplicator::UpdateMoveRects()
|
||||
|
||||
void Duplicator::UpdateDirtyRects()
|
||||
{
|
||||
Debug::Log(__FUNCTION__);
|
||||
|
||||
const auto hr = dupl_->GetFrameDirtyRects(
|
||||
metaData_.buffer.Size() - metaData_.moveRectSize,
|
||||
metaData_.buffer.As<RECT>(metaData_.moveRectSize /* offset */),
|
||||
|
||||
@@ -30,8 +30,6 @@ void Monitor::Initialize(
|
||||
const ComPtr<IDXGIOutput> &output
|
||||
)
|
||||
{
|
||||
Debug::Log(__FUNCTION__);
|
||||
|
||||
adapter_ = adapter;
|
||||
output_ = output;
|
||||
|
||||
@@ -66,16 +64,12 @@ void Monitor::Initialize(
|
||||
|
||||
void Monitor::Finalize()
|
||||
{
|
||||
Debug::Log(__FUNCTION__);
|
||||
|
||||
StopCapture();
|
||||
}
|
||||
|
||||
|
||||
void Monitor::Render()
|
||||
{
|
||||
Debug::Log(__FUNCTION__);
|
||||
|
||||
const auto& frame = duplicator_->GetLastFrame();
|
||||
|
||||
if (frame.id == lastFrameId_) return;
|
||||
@@ -122,8 +116,6 @@ void Monitor::Render()
|
||||
|
||||
void Monitor::StartCapture()
|
||||
{
|
||||
Debug::Log(__FUNCTION__);
|
||||
|
||||
if (duplicator_->GetState() == DuplicatorState::Ready)
|
||||
{
|
||||
duplicator_->Start();
|
||||
@@ -133,8 +125,6 @@ void Monitor::StartCapture()
|
||||
|
||||
void Monitor::StopCapture()
|
||||
{
|
||||
Debug::Log(__FUNCTION__);
|
||||
|
||||
duplicator_->Stop();
|
||||
}
|
||||
|
||||
|
||||
@@ -32,8 +32,6 @@ MonitorManager::~MonitorManager()
|
||||
|
||||
void MonitorManager::Initialize()
|
||||
{
|
||||
Debug::Log(__FUNCTION__);
|
||||
|
||||
Finalize();
|
||||
|
||||
// Get factory
|
||||
@@ -65,8 +63,6 @@ void MonitorManager::Initialize()
|
||||
|
||||
void MonitorManager::Finalize()
|
||||
{
|
||||
Debug::Log(__FUNCTION__);
|
||||
|
||||
for (const auto& monitor : monitors_)
|
||||
{
|
||||
monitor->Finalize();
|
||||
@@ -78,8 +74,6 @@ void MonitorManager::Finalize()
|
||||
|
||||
void MonitorManager::Update()
|
||||
{
|
||||
Debug::Log(__FUNCTION__);
|
||||
|
||||
if (isReinitializationRequired_)
|
||||
{
|
||||
Reinitialize();
|
||||
@@ -90,8 +84,6 @@ void MonitorManager::Update()
|
||||
|
||||
void MonitorManager::RequireReinitilization()
|
||||
{
|
||||
Debug::Log(__FUNCTION__);
|
||||
|
||||
Debug::Log("MonitorManager::Reinitialize() was required.");
|
||||
isReinitializationRequired_ = true;
|
||||
}
|
||||
@@ -99,8 +91,6 @@ void MonitorManager::RequireReinitilization()
|
||||
|
||||
void MonitorManager::Reinitialize()
|
||||
{
|
||||
Debug::Log(__FUNCTION__);
|
||||
|
||||
Debug::Log("MonitorManager::Reinitialize()");
|
||||
Initialize();
|
||||
SendMessageToUnity(Message::Reinitialized);
|
||||
|
||||
@@ -35,8 +35,6 @@ extern "C"
|
||||
|
||||
UNITY_INTERFACE_EXPORT void UNITY_INTERFACE_API Initialize()
|
||||
{
|
||||
Debug::Log(__FUNCTION__);
|
||||
|
||||
if (g_unity && !g_manager)
|
||||
{
|
||||
Debug::Initialize();
|
||||
@@ -67,8 +65,6 @@ extern "C"
|
||||
|
||||
UNITY_INTERFACE_EXPORT void UNITY_INTERFACE_API Finalize()
|
||||
{
|
||||
Debug::Log(__FUNCTION__);
|
||||
|
||||
if (!g_manager) return;
|
||||
|
||||
g_manager->Finalize();
|
||||
@@ -82,8 +78,6 @@ extern "C"
|
||||
|
||||
void UNITY_INTERFACE_API OnGraphicsDeviceEvent(UnityGfxDeviceEventType event)
|
||||
{
|
||||
Debug::Log(__FUNCTION__);
|
||||
|
||||
switch (event)
|
||||
{
|
||||
case kUnityGfxDeviceEventInitialize:
|
||||
@@ -101,8 +95,6 @@ extern "C"
|
||||
|
||||
UNITY_INTERFACE_EXPORT void UNITY_INTERFACE_API UnityPluginLoad(IUnityInterfaces* unityInterfaces)
|
||||
{
|
||||
Debug::Log(__FUNCTION__);
|
||||
|
||||
g_unity = unityInterfaces;
|
||||
auto unityGraphics = g_unity->Get<IUnityGraphics>();
|
||||
unityGraphics->RegisterDeviceEventCallback(OnGraphicsDeviceEvent);
|
||||
@@ -110,8 +102,6 @@ extern "C"
|
||||
|
||||
UNITY_INTERFACE_EXPORT void UNITY_INTERFACE_API UnityPluginUnload()
|
||||
{
|
||||
Debug::Log(__FUNCTION__);
|
||||
|
||||
auto unityGraphics = g_unity->Get<IUnityGraphics>();
|
||||
unityGraphics->UnregisterDeviceEventCallback(OnGraphicsDeviceEvent);
|
||||
g_unity = nullptr;
|
||||
@@ -119,8 +109,6 @@ extern "C"
|
||||
|
||||
void UNITY_INTERFACE_API OnRenderEvent(int id)
|
||||
{
|
||||
Debug::Log(__FUNCTION__);
|
||||
|
||||
if (!g_manager) return;
|
||||
if (auto monitor = g_manager->GetMonitor(id))
|
||||
{
|
||||
@@ -135,24 +123,18 @@ extern "C"
|
||||
|
||||
UNITY_INTERFACE_EXPORT void UNITY_INTERFACE_API Reinitialize()
|
||||
{
|
||||
Debug::Log(__FUNCTION__);
|
||||
|
||||
if (!g_manager) return;
|
||||
return g_manager->Reinitialize();
|
||||
}
|
||||
|
||||
UNITY_INTERFACE_EXPORT void UNITY_INTERFACE_API Update()
|
||||
{
|
||||
Debug::Log(__FUNCTION__);
|
||||
|
||||
if (!g_manager) return;
|
||||
g_manager->Update();
|
||||
}
|
||||
|
||||
UNITY_INTERFACE_EXPORT Message UNITY_INTERFACE_API PopMessage()
|
||||
{
|
||||
Debug::Log(__FUNCTION__);
|
||||
|
||||
if (g_messages.empty()) return Message::None;
|
||||
|
||||
const auto message = g_messages.front();
|
||||
|
||||
Reference in New Issue
Block a user