Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
3b9332a4
Commit
3b9332a4
authored
Mar 09, 2009
by
Tony Wasserka
Committed by
Alexandre Julliard
Mar 10, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9: Recognize the D3DXSPRITE_DO_NOT_ADDREF_TEXTURE flag.
parent
02e43a52
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
sprite.c
dlls/d3dx9_36/sprite.c
+4
-4
No files found.
dlls/d3dx9_36/sprite.c
View file @
3b9332a4
...
...
@@ -222,7 +222,6 @@ D3DXSPRITE_OBJECTSPACE: do not change device transforms
D3DXSPRITE_SORT_DEPTH_BACKTOFRONT: sort by position
D3DXSPRITE_SORT_DEPTH_FRONTTOBACK: sort by position
D3DXSPRITE_SORT_TEXTURE: sort by texture (so that it doesn't change too often)
D3DXSPRITE_DO_NOT_ADDREF_TEXTURE: don't call AddRef/Release on every Draw/Flush call
*/
if
(
This
->
vdecl
==
NULL
)
{
static
const
D3DVERTEXELEMENT9
elements
[]
=
...
...
@@ -283,7 +282,8 @@ static HRESULT WINAPI ID3DXSpriteImpl_Draw(LPD3DXSPRITE iface, LPDIRECT3DTEXTURE
This
->
sprites
=
HeapReAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
This
->
sprites
,
This
->
allocated_sprites
*
sizeof
(
SPRITE
));
}
This
->
sprites
[
This
->
sprite_count
].
texture
=
texture
;
IUnknown_AddRef
(
texture
);
if
(
!
(
This
->
flags
&
D3DXSPRITE_DO_NOT_ADDREF_TEXTURE
))
IDirect3DTexture9_AddRef
(
texture
);
/* Reuse the texture desc if possible */
if
(
This
->
sprite_count
)
{
...
...
@@ -381,8 +381,8 @@ static HRESULT WINAPI ID3DXSpriteImpl_Flush(LPD3DXSPRITE iface)
}
HeapFree
(
GetProcessHeap
(),
0
,
vertices
);
for
(
i
=
0
;
i
<
This
->
sprite_count
;
i
++
)
if
(
This
->
sprites
[
i
].
texture
)
if
(
!
(
This
->
flags
&
D3DXSPRITE_DO_NOT_ADDREF_TEXTURE
)
)
for
(
i
=
0
;
i
<
This
->
sprite_count
;
i
++
)
IDirect3DTexture9_Release
(
This
->
sprites
[
i
].
texture
);
This
->
sprite_count
=
0
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment