summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsTools
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2019-10-08 03:53:26 +0000
committerEgor Yusov <egor.yusov@gmail.com>2019-10-08 03:53:26 +0000
commit20fbea68913e09adad6bb0a4357e995ceb782871 (patch)
tree5da2b6e8a452f5f37a519349fa51a3a5a922c818 /Graphics/GraphicsTools
parentD3D11 backend: cosmetic code changes (diff)
downloadDiligentCore-20fbea68913e09adad6bb0a4357e995ceb782871.tar.gz
DiligentCore-20fbea68913e09adad6bb0a4357e995ceb782871.zip
More cosmetic code changes
Diffstat (limited to 'Graphics/GraphicsTools')
-rw-r--r--Graphics/GraphicsTools/include/ScreenCapture.h2
-rw-r--r--Graphics/GraphicsTools/src/ScreenCapture.cpp8
2 files changed, 5 insertions, 5 deletions
diff --git a/Graphics/GraphicsTools/include/ScreenCapture.h b/Graphics/GraphicsTools/include/ScreenCapture.h
index f56d6f9c..d4f8533f 100644
--- a/Graphics/GraphicsTools/include/ScreenCapture.h
+++ b/Graphics/GraphicsTools/include/ScreenCapture.h
@@ -58,7 +58,7 @@ public:
size_t GetNumPendingCaptures()
{
- std::lock_guard<std::mutex> Lock(m_PendingTexturesMtx);
+ std::lock_guard<std::mutex> Lock{m_PendingTexturesMtx};
return m_PendingTextures.size();
}
diff --git a/Graphics/GraphicsTools/src/ScreenCapture.cpp b/Graphics/GraphicsTools/src/ScreenCapture.cpp
index 5f770301..20b8fd6a 100644
--- a/Graphics/GraphicsTools/src/ScreenCapture.cpp
+++ b/Graphics/GraphicsTools/src/ScreenCapture.cpp
@@ -44,7 +44,7 @@ void ScreenCapture::Capture(ISwapChain* pSwapChain, IDeviceContext* pContext, Ui
RefCntAutoPtr<ITexture> pStagingTexture;
{
- std::lock_guard<std::mutex> Lock(m_AvailableTexturesMtx);
+ std::lock_guard<std::mutex> Lock{m_AvailableTexturesMtx};
while (!m_AvailableTextures.empty() && !pStagingTexture)
{
pStagingTexture = std::move(m_AvailableTextures.back());
@@ -77,7 +77,7 @@ void ScreenCapture::Capture(ISwapChain* pSwapChain, IDeviceContext* pContext, Ui
pContext->SignalFence(m_pFence, m_CurrentFenceValue);
{
- std::lock_guard<std::mutex> Lock(m_PendingTexturesMtx);
+ std::lock_guard<std::mutex> Lock{m_PendingTexturesMtx};
m_PendingTextures.emplace_back(std::move(pStagingTexture), FrameId, m_CurrentFenceValue);
}
@@ -88,7 +88,7 @@ void ScreenCapture::Capture(ISwapChain* pSwapChain, IDeviceContext* pContext, Ui
ScreenCapture::CaptureInfo ScreenCapture::GetCapture()
{
CaptureInfo Capture;
- std::lock_guard<std::mutex> Lock(m_PendingTexturesMtx);
+ std::lock_guard<std::mutex> Lock{m_PendingTexturesMtx};
if (!m_PendingTextures.empty())
{
auto& OldestCapture = m_PendingTextures.front();
@@ -105,7 +105,7 @@ ScreenCapture::CaptureInfo ScreenCapture::GetCapture()
void ScreenCapture::RecycleStagingTexture(RefCntAutoPtr<ITexture>&& pTexture)
{
- std::lock_guard<std::mutex> Lock(m_AvailableTexturesMtx);
+ std::lock_guard<std::mutex> Lock{m_AvailableTexturesMtx};
m_AvailableTextures.emplace_back(std::move(pTexture));
}