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
025f4aed
Commit
025f4aed
authored
Sep 07, 2012
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Move the fps tracing to opengl32.
parent
05c32b9b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
21 deletions
+22
-21
wgl.c
dlls/opengl32/wgl.c
+22
-1
opengl.c
dlls/winex11.drv/opengl.c
+0
-20
No files found.
dlls/opengl32/wgl.c
View file @
025f4aed
...
...
@@ -41,6 +41,7 @@
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
wgl
);
WINE_DECLARE_DEBUG_CHANNEL
(
fps
);
static
HMODULE
opengl32_handle
;
...
...
@@ -603,7 +604,27 @@ BOOL WINAPI DECLSPEC_HOTPATCH wglSwapBuffers( HDC hdc )
const
struct
opengl_funcs
*
funcs
=
get_dc_funcs
(
hdc
);
if
(
!
funcs
||
!
funcs
->
wgl
.
p_wglSwapBuffers
)
return
FALSE
;
return
funcs
->
wgl
.
p_wglSwapBuffers
(
hdc
);
if
(
!
funcs
->
wgl
.
p_wglSwapBuffers
(
hdc
))
return
FALSE
;
if
(
TRACE_ON
(
fps
))
{
static
long
prev_time
,
start_time
;
static
unsigned
long
frames
,
frames_total
;
DWORD
time
=
GetTickCount
();
frames
++
;
frames_total
++
;
/* every 1.5 seconds */
if
(
time
-
prev_time
>
1500
)
{
TRACE_
(
fps
)(
"@ approx %.2ffps, total %.2ffps
\n
"
,
1000
.
0
*
frames
/
(
time
-
prev_time
),
1000
.
0
*
frames_total
/
(
time
-
start_time
));
prev_time
=
time
;
frames
=
0
;
if
(
start_time
==
0
)
start_time
=
time
;
}
}
return
TRUE
;
}
/***********************************************************************
...
...
dlls/winex11.drv/opengl.c
View file @
025f4aed
...
...
@@ -57,7 +57,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(wgl);
#ifdef SONAME_LIBGL
WINE_DECLARE_DEBUG_CHANNEL
(
winediag
);
WINE_DECLARE_DEBUG_CHANNEL
(
fps
);
#include "wine/wgl_driver.h"
#include "wine/wglext.h"
...
...
@@ -3067,25 +3066,6 @@ static BOOL glxdrv_wglSwapBuffers( HDC hdc )
ExtEscape
(
hdc
,
X11DRV_ESCAPE
,
sizeof
(
code
),
(
LPSTR
)
&
code
,
0
,
NULL
);
/* FPS support */
if
(
TRACE_ON
(
fps
))
{
static
long
prev_time
,
start_time
;
static
unsigned
long
frames
,
frames_total
;
DWORD
time
=
GetTickCount
();
frames
++
;
frames_total
++
;
/* every 1.5 seconds */
if
(
time
-
prev_time
>
1500
)
{
TRACE_
(
fps
)(
"@ approx %.2ffps, total %.2ffps
\n
"
,
1000
.
0
*
frames
/
(
time
-
prev_time
),
1000
.
0
*
frames_total
/
(
time
-
start_time
));
prev_time
=
time
;
frames
=
0
;
if
(
start_time
==
0
)
start_time
=
time
;
}
}
return
ret
;
}
...
...
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