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
ebcf08e5
Commit
ebcf08e5
authored
Jun 28, 2011
by
Henri Verbeet
Committed by
Alexandre Julliard
Jun 28, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Properly destroy contexts not owned by the implcit swapchain.
In particular, set num_contexts to 0 in the swapchain that owns the contexts.
parent
560d5188
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
2 deletions
+14
-2
device.c
dlls/wined3d/device.c
+2
-2
swapchain.c
dlls/wined3d/swapchain.c
+11
-0
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-0
No files found.
dlls/wined3d/device.c
View file @
ebcf08e5
...
...
@@ -5547,11 +5547,11 @@ static void delete_opengl_contexts(struct wined3d_device *device, struct wined3d
while
(
device
->
context_count
)
{
context_destroy
(
device
,
device
->
contexts
[
0
]
);
swapchain_destroy_contexts
(
device
->
contexts
[
0
]
->
swapchain
);
}
HeapFree
(
GetProcessHeap
(),
0
,
swapchain
->
context
);
swapchain
->
context
=
NULL
;
swapchain
->
num_contexts
=
0
;
}
/* Do not call while under the GL lock. */
...
...
dlls/wined3d/swapchain.c
View file @
ebcf08e5
...
...
@@ -1164,6 +1164,17 @@ static struct wined3d_context *swapchain_create_context(struct wined3d_swapchain
return
ctx
;
}
void
swapchain_destroy_contexts
(
struct
wined3d_swapchain
*
swapchain
)
{
unsigned
int
i
;
for
(
i
=
0
;
i
<
swapchain
->
num_contexts
;
++
i
)
{
context_destroy
(
swapchain
->
device
,
swapchain
->
context
[
i
]);
}
swapchain
->
num_contexts
=
0
;
}
struct
wined3d_context
*
swapchain_get_context
(
struct
wined3d_swapchain
*
swapchain
)
{
DWORD
tid
=
GetCurrentThreadId
();
...
...
dlls/wined3d/wined3d_private.h
View file @
ebcf08e5
...
...
@@ -2493,6 +2493,7 @@ struct wined3d_swapchain
void
x11_copy_to_screen
(
struct
wined3d_swapchain
*
swapchain
,
const
RECT
*
rect
)
DECLSPEC_HIDDEN
;
struct
wined3d_context
*
swapchain_get_context
(
struct
wined3d_swapchain
*
swapchain
)
DECLSPEC_HIDDEN
;
void
swapchain_destroy_contexts
(
struct
wined3d_swapchain
*
swapchain
)
DECLSPEC_HIDDEN
;
#define DEFAULT_REFRESH_RATE 0
...
...
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