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
03389acc
Commit
03389acc
authored
Jan 12, 2007
by
Stefan Dösinger
Committed by
Alexandre Julliard
Jan 15, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Do not free regularily locked surfaces.
parent
a7916d80
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
0 deletions
+15
-0
surface.c
dlls/wined3d/surface.c
+13
-0
wined3d_private.h
dlls/wined3d/wined3d_private.h
+2
-0
No files found.
dlls/wined3d/surface.c
View file @
03389acc
...
...
@@ -824,6 +824,19 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_LockRect(IWineD3DSurface *iface, WINED
}
}
/* Performance optimization: Count how often a surface is locked, if it is locked regularly do not throw away the system memory copy.
* This avoids the need to download the surface from opengl all the time. The surface is still downloaded if the opengl texture is
* changed
*/
if
(
!
(
This
->
Flags
&
SFLAG_DYNLOCK
))
{
This
->
lockCount
++
;
/* MAXLOCKCOUNT is defined in wined3d_private.h */
if
(
This
->
lockCount
>
MAXLOCKCOUNT
)
{
TRACE
(
"Surface is locked regularily, not freeing the system memory copy any more
\n
"
);
This
->
Flags
|=
SFLAG_DYNLOCK
;
}
}
TRACE
(
"returning memory@%p, pitch(%d) dirtyfied(%d)
\n
"
,
pLockedRect
->
pBits
,
pLockedRect
->
Pitch
,
This
->
Flags
&
SFLAG_DIRTY
?
0
:
1
);
This
->
Flags
|=
SFLAG_LOCKED
;
...
...
dlls/wined3d/wined3d_private.h
View file @
03389acc
...
...
@@ -984,6 +984,8 @@ struct IWineD3DSurfaceImpl
RECT
lockedRect
;
RECT
dirtyRect
;
int
lockCount
;
#define MAXLOCKCOUNT 50
/* After this amount of locks do not free the sysmem copy */
glDescriptor
glDescription
;
...
...
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