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
817b520c
Commit
817b520c
authored
Nov 09, 2007
by
Roderick Colenbrander
Committed by
Alexandre Julliard
Nov 12, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Prevent unneeded context switches.
parent
9b0d661e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
+11
-4
context.c
dlls/wined3d/context.c
+11
-4
No files found.
dlls/wined3d/context.c
View file @
817b520c
...
...
@@ -860,10 +860,17 @@ void ActivateContext(IWineD3DDeviceImpl *This, IWineD3DSurface *target, ContextU
/* Activate the opengl context */
if
(
context
!=
This
->
activeContext
)
{
BOOL
ret
;
TRACE
(
"Switching gl ctx to %p, hdc=%p ctx=%p
\n
"
,
context
,
context
->
hdc
,
context
->
glCtx
);
ret
=
pwglMakeCurrent
(
context
->
hdc
,
context
->
glCtx
);
if
(
ret
==
FALSE
)
{
ERR
(
"Failed to activate the new context
\n
"
);
/* Prevent an unneeded context switch as those are expensive */
if
(
context
->
glCtx
&&
(
context
->
glCtx
==
pwglGetCurrentContext
()))
{
TRACE
(
"Already using gl context %p
\n
"
,
context
->
glCtx
);
}
else
{
TRACE
(
"Switching gl ctx to %p, hdc=%p ctx=%p
\n
"
,
context
,
context
->
hdc
,
context
->
glCtx
);
ret
=
pwglMakeCurrent
(
context
->
hdc
,
context
->
glCtx
);
if
(
ret
==
FALSE
)
{
ERR
(
"Failed to activate the new context
\n
"
);
}
}
This
->
activeContext
=
context
;
}
...
...
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