Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
13163832
Commit
13163832
authored
Jul 10, 2022
by
Zebediah Figura
Committed by
Alexandre Julliard
Sep 27, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Add FPS tracing in ddraw_surface_update_frontbuffer().
This usually doesn't go through the normal presentation paths.
parent
5f1cbb1b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
0 deletions
+19
-0
ddraw_private.h
dlls/ddraw/ddraw_private.h
+3
-0
surface.c
dlls/ddraw/surface.c
+16
-0
No files found.
dlls/ddraw/ddraw_private.h
View file @
13163832
...
...
@@ -136,6 +136,9 @@ struct ddraw
struct
wined3d_stateblock
*
state
;
const
struct
wined3d_stateblock_state
*
stateblock_state
;
unsigned
int
frames
;
DWORD
prev_frame_time
;
};
#define DDRAW_WINDOW_CLASS_NAME "DirectDrawDeviceWnd"
...
...
dlls/ddraw/surface.c
View file @
13163832
...
...
@@ -24,6 +24,7 @@
#include "ddraw_private.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
ddraw
);
WINE_DECLARE_DEBUG_CHANNEL
(
fps
);
static
struct
ddraw_surface
*
unsafe_impl_from_IDirectDrawSurface2
(
IDirectDrawSurface2
*
iface
);
static
struct
ddraw_surface
*
unsafe_impl_from_IDirectDrawSurface3
(
IDirectDrawSurface3
*
iface
);
...
...
@@ -87,6 +88,21 @@ HRESULT ddraw_surface_update_frontbuffer(struct ddraw_surface *surface,
if
(
w
<=
0
||
h
<=
0
)
return
DD_OK
;
if
(
!
read
&&
TRACE_ON
(
fps
))
{
DWORD
time
=
GetTickCount
();
++
ddraw
->
frames
;
/* every 1.5 seconds */
if
(
time
-
ddraw
->
prev_frame_time
>
1500
)
{
TRACE_
(
fps
)(
"%p @ approx %.2ffps
\n
"
,
ddraw
,
1000
.
0
*
ddraw
->
frames
/
(
time
-
ddraw
->
prev_frame_time
));
ddraw
->
prev_frame_time
=
time
;
ddraw
->
frames
=
0
;
}
}
/* The interaction between ddraw and GDI drawing is not all that well
* documented, and somewhat arcane. In ddraw exclusive mode, GDI draws
* seemingly go to the *original* frontbuffer/primary surface, while ddraw
...
...
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