mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-06 16:18:58 +00:00
DX11: Introduce a StateManager class, might improve performance a little.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5740 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
b4f5a4d89e
commit
5cfdb2d0c8
9 changed files with 54 additions and 334 deletions
|
@ -31,8 +31,7 @@ struct TexbufDeleter
|
|||
{
|
||||
~TexbufDeleter()
|
||||
{
|
||||
if (texbuf) delete[] texbuf;
|
||||
texbuf = NULL;
|
||||
SAFE_DELETE_ARRAY(texbuf);
|
||||
texbufsize = 0;
|
||||
}
|
||||
} texbufdeleter;
|
||||
|
@ -55,7 +54,7 @@ void ReplaceTexture2D(ID3D11Texture2D* pTexture, const u8* buffer, unsigned int
|
|||
{
|
||||
if (texbufsize < 4*width*height)
|
||||
{
|
||||
if (texbuf) delete[] texbuf;
|
||||
SAFE_DELETE_ARRAY(texbuf);
|
||||
texbuf = new u8[4*width*height];
|
||||
texbufsize = 4*width*height;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue