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
eb527c82
Commit
eb527c82
authored
Jul 05, 2006
by
Stefan Dösinger
Committed by
Alexandre Julliard
Jul 07, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a common fps counter channel to ddraw, opengl and d3d.
parent
bb64efaf
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
3 deletions
+35
-3
surface_gdi.c
dlls/wined3d/surface_gdi.c
+16
-0
swapchain.c
dlls/wined3d/swapchain.c
+3
-3
opengl.c
dlls/winex11.drv/opengl.c
+16
-0
No files found.
dlls/wined3d/surface_gdi.c
View file @
eb527c82
...
...
@@ -34,6 +34,7 @@
/* Use the d3d_surface debug channel to have one channel for all surfaces */
WINE_DEFAULT_DEBUG_CHANNEL
(
d3d_surface
);
WINE_DECLARE_DEBUG_CHANNEL
(
fps
);
/*****************************************************************************
* x11_copy_to_screen
...
...
@@ -379,6 +380,21 @@ IWineGDISurfaceImpl_Flip(IWineD3DSurface *iface,
/* Update the screen */
x11_copy_to_screen
(
This
,
NULL
);
/* FPS support */
if
(
TRACE_ON
(
fps
))
{
static
long
prev_time
,
frames
;
DWORD
time
=
GetTickCount
();
frames
++
;
/* every 1.5 seconds */
if
(
time
-
prev_time
>
1500
)
{
TRACE_
(
fps
)(
"@ approx %.2ffps
\n
"
,
1000
.
0
*
frames
/
(
time
-
prev_time
));
prev_time
=
time
;
frames
=
0
;
}
}
return
WINED3D_OK
;
}
...
...
dlls/wined3d/swapchain.c
View file @
eb527c82
...
...
@@ -51,7 +51,7 @@ inline static Display *get_display( HDC hdc )
WINE_DEFAULT_DEBUG_CHANNEL
(
d3d
);
WINE_DECLARE_DEBUG_CHANNEL
(
d3d_
fps
);
WINE_DECLARE_DEBUG_CHANNEL
(
fps
);
/* IDirect3DSwapChain IUnknown parts follow: */
...
...
@@ -265,7 +265,7 @@ static HRESULT WINAPI IWineD3DSwapChainImpl_Present(IWineD3DSwapChain *iface, CO
TRACE
(
"glXSwapBuffers called, Starting new frame
\n
"
);
/* FPS support */
if
(
TRACE_ON
(
d3d_
fps
))
if
(
TRACE_ON
(
fps
))
{
static
long
prev_time
,
frames
;
...
...
@@ -273,7 +273,7 @@ static HRESULT WINAPI IWineD3DSwapChainImpl_Present(IWineD3DSwapChain *iface, CO
frames
++
;
/* every 1.5 seconds */
if
(
time
-
prev_time
>
1500
)
{
TRACE_
(
d3d_
fps
)(
"@ approx %.2ffps
\n
"
,
1000
.
0
*
frames
/
(
time
-
prev_time
));
TRACE_
(
fps
)(
"@ approx %.2ffps
\n
"
,
1000
.
0
*
frames
/
(
time
-
prev_time
));
prev_time
=
time
;
frames
=
0
;
}
...
...
dlls/winex11.drv/opengl.c
View file @
eb527c82
...
...
@@ -30,6 +30,7 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
wgl
);
WINE_DECLARE_DEBUG_CHANNEL
(
opengl
);
WINE_DECLARE_DEBUG_CHANNEL
(
fps
);
#if defined(HAVE_GL_GL_H) && defined(HAVE_GL_GLX_H)
...
...
@@ -593,6 +594,21 @@ BOOL X11DRV_SwapBuffers(X11DRV_PDEVICE *physDev)
pglXSwapBuffers
(
gdi_display
,
drawable
);
wine_tsx11_unlock
();
/* FPS support */
if
(
TRACE_ON
(
fps
))
{
static
long
prev_time
,
frames
;
DWORD
time
=
GetTickCount
();
frames
++
;
/* every 1.5 seconds */
if
(
time
-
prev_time
>
1500
)
{
TRACE_
(
fps
)(
"@ approx %.2ffps
\n
"
,
1000
.
0
*
frames
/
(
time
-
prev_time
));
prev_time
=
time
;
frames
=
0
;
}
}
return
TRUE
;
}
...
...
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