mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-24 09:27:31 +09:00
Issue #2393 - Part 5 - Extract D3D11MTAutoEnter and reuse
This commit is contained in:
parent
6807675123
commit
04f124b105
3 changed files with 21 additions and 26 deletions
|
|
@ -461,6 +461,20 @@ private:
|
|||
RefPtr<IDXGIKeyedMutex> mMutex;
|
||||
};
|
||||
|
||||
class D3D11MTAutoEnter
|
||||
{
|
||||
public:
|
||||
explicit D3D11MTAutoEnter(already_AddRefed<ID3D10Multithread> aMT)
|
||||
: mMT(aMT)
|
||||
{
|
||||
mMT->Enter();
|
||||
}
|
||||
~D3D11MTAutoEnter() { mMT->Leave(); }
|
||||
|
||||
private:
|
||||
RefPtr<ID3D10Multithread> mMT;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue