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
b439fa9d
Commit
b439fa9d
authored
Jan 18, 2011
by
Henri Verbeet
Committed by
Alexandre Julliard
Jan 19, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Pass an IWineD3DSwapChainImpl pointer to swapchain_create_context_for_thread().
parent
237cdefe
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
13 deletions
+12
-13
context.c
dlls/wined3d/context.c
+1
-1
swapchain.c
dlls/wined3d/swapchain.c
+10
-11
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-1
No files found.
dlls/wined3d/context.c
View file @
b439fa9d
...
...
@@ -1878,7 +1878,7 @@ static struct wined3d_context *findThreadContextForSwapChain(IWineD3DSwapChain *
}
/* Create a new context for the thread */
return
swapchain_create_context_for_thread
(
swapchain
);
return
swapchain_create_context_for_thread
(
(
IWineD3DSwapChainImpl
*
)
swapchain
);
}
/* Do not call while under the GL lock. */
...
...
dlls/wined3d/swapchain.c
View file @
b439fa9d
...
...
@@ -783,32 +783,31 @@ err:
}
/* Do not call while under the GL lock. */
struct
wined3d_context
*
swapchain_create_context_for_thread
(
IWineD3DSwapChain
*
iface
)
struct
wined3d_context
*
swapchain_create_context_for_thread
(
IWineD3DSwapChain
Impl
*
swapchain
)
{
IWineD3DSwapChainImpl
*
This
=
(
IWineD3DSwapChainImpl
*
)
iface
;
struct
wined3d_context
**
newArray
;
struct
wined3d_context
*
ctx
;
TRACE
(
"Creating a new context for swapchain %p, thread %
d
\n
"
,
This
,
GetCurrentThreadId
());
TRACE
(
"Creating a new context for swapchain %p, thread %
u.
\n
"
,
swapchain
,
GetCurrentThreadId
());
if
(
!
(
ctx
=
context_create
(
This
,
This
->
front_buffer
,
This
->
ds_format
)))
if
(
!
(
ctx
=
context_create
(
swapchain
,
swapchain
->
front_buffer
,
swapchain
->
ds_format
)))
{
ERR
(
"Failed to create a new context for the swapchain
\n
"
);
return
NULL
;
}
context_release
(
ctx
);
newArray
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
newArray
)
*
(
This
->
num_contexts
+
1
));
newArray
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
newArray
)
*
(
swapchain
->
num_contexts
+
1
));
if
(
!
newArray
)
{
ERR
(
"Out of memory when trying to allocate a new context array
\n
"
);
context_destroy
(
This
->
device
,
ctx
);
context_destroy
(
swapchain
->
device
,
ctx
);
return
NULL
;
}
memcpy
(
newArray
,
This
->
context
,
sizeof
(
*
newArray
)
*
This
->
num_contexts
);
HeapFree
(
GetProcessHeap
(),
0
,
This
->
context
);
newArray
[
This
->
num_contexts
]
=
ctx
;
This
->
context
=
newArray
;
This
->
num_contexts
++
;
memcpy
(
newArray
,
swapchain
->
context
,
sizeof
(
*
newArray
)
*
swapchain
->
num_contexts
);
HeapFree
(
GetProcessHeap
(),
0
,
swapchain
->
context
);
newArray
[
swapchain
->
num_contexts
]
=
ctx
;
swapchain
->
context
=
newArray
;
swapchain
->
num_contexts
++
;
TRACE
(
"Returning context %p
\n
"
,
ctx
);
return
ctx
;
...
...
dlls/wined3d/wined3d_private.h
View file @
b439fa9d
...
...
@@ -2634,7 +2634,7 @@ HRESULT WINAPI IWineD3DBaseSwapChainImpl_SetGammaRamp(IWineD3DSwapChain *iface,
HRESULT
WINAPI
IWineD3DBaseSwapChainImpl_GetGammaRamp
(
IWineD3DSwapChain
*
iface
,
WINED3DGAMMARAMP
*
pRamp
)
DECLSPEC_HIDDEN
;
struct
wined3d_context
*
swapchain_create_context_for_thread
(
IWineD3DSwapChain
*
iface
)
DECLSPEC_HIDDEN
;
struct
wined3d_context
*
swapchain_create_context_for_thread
(
struct
IWineD3DSwapChainImpl
*
swapchain
)
DECLSPEC_HIDDEN
;
HRESULT
swapchain_init
(
IWineD3DSwapChainImpl
*
swapchain
,
WINED3DSURFTYPE
surface_type
,
IWineD3DDeviceImpl
*
device
,
WINED3DPRESENT_PARAMETERS
*
present_parameters
,
void
*
parent
)
DECLSPEC_HIDDEN
;
...
...
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