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
e6ca176a
Commit
e6ca176a
authored
Oct 28, 2009
by
Henri Verbeet
Committed by
Alexandre Julliard
Oct 28, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Rename DestroyContext() to context_destroy().
parent
c0050b8e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
13 deletions
+14
-13
context.c
dlls/wined3d/context.c
+5
-5
device.c
dlls/wined3d/device.c
+5
-4
swapchain.c
dlls/wined3d/swapchain.c
+3
-3
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-1
No files found.
dlls/wined3d/context.c
View file @
e6ca176a
...
@@ -1501,7 +1501,7 @@ out:
...
@@ -1501,7 +1501,7 @@ out:
* destroyed or unset. context is not a valid pointer after that call.
* destroyed or unset. context is not a valid pointer after that call.
*
*
* Similar to the former call this isn't a performance critical function. A
* Similar to the former call this isn't a performance critical function. A
* helper function for
DestroyContext
.
* helper function for
context_destroy()
.
*
*
* Params:
* Params:
* This: Device to activate the context for
* This: Device to activate the context for
...
@@ -1556,16 +1556,16 @@ static void RemoveContextFromArray(IWineD3DDeviceImpl *This, struct wined3d_cont
...
@@ -1556,16 +1556,16 @@ static void RemoveContextFromArray(IWineD3DDeviceImpl *This, struct wined3d_cont
}
}
/*****************************************************************************
/*****************************************************************************
*
DestroyContext
*
context_destroy
*
*
* Destroys a wine
D3DC
ontext
* Destroys a wine
d3d c
ontext
*
*
* Params:
* Params:
* This: Device to activate the context for
* This: Device to activate the context for
* context: Context to destroy
* context: Context to destroy
*
*
*****************************************************************************/
*****************************************************************************/
void
DestroyContext
(
IWineD3DDeviceImpl
*
This
,
struct
wined3d_context
*
context
)
void
context_destroy
(
IWineD3DDeviceImpl
*
This
,
struct
wined3d_context
*
context
)
{
{
BOOL
destroy
;
BOOL
destroy
;
...
@@ -1904,7 +1904,7 @@ retry:
...
@@ -1904,7 +1904,7 @@ retry:
||
This
->
pbufferWidth
<
targetimpl
->
currentDesc
.
Width
||
This
->
pbufferWidth
<
targetimpl
->
currentDesc
.
Width
||
This
->
pbufferHeight
<
targetimpl
->
currentDesc
.
Height
)
||
This
->
pbufferHeight
<
targetimpl
->
currentDesc
.
Height
)
{
{
if
(
This
->
pbufferContext
)
DestroyContext
(
This
,
This
->
pbufferContext
);
if
(
This
->
pbufferContext
)
context_destroy
(
This
,
This
->
pbufferContext
);
/* The display is irrelevant here, the window is 0. But
/* The display is irrelevant here, the window is 0. But
* context_create() needs a valid X connection. Create the context
* context_create() needs a valid X connection. Create the context
...
...
dlls/wined3d/device.c
View file @
e6ca176a
...
@@ -1307,7 +1307,7 @@ error:
...
@@ -1307,7 +1307,7 @@ error:
if
(
object
->
context
&&
object
->
context
[
0
])
if
(
object
->
context
&&
object
->
context
[
0
])
{
{
context_release
(
object
->
context
[
0
]);
context_release
(
object
->
context
[
0
]);
DestroyContext
(
This
,
object
->
context
[
0
]);
context_destroy
(
This
,
object
->
context
[
0
]);
}
}
if
(
object
->
frontBuffer
)
IWineD3DSurface_Release
(
object
->
frontBuffer
);
if
(
object
->
frontBuffer
)
IWineD3DSurface_Release
(
object
->
frontBuffer
);
HeapFree
(
GetProcessHeap
(),
0
,
object
);
HeapFree
(
GetProcessHeap
(),
0
,
object
);
...
@@ -2011,7 +2011,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Uninit3D(IWineD3DDevice *iface,
...
@@ -2011,7 +2011,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Uninit3D(IWineD3DDevice *iface,
}
}
/* Delete the pbuffer context if there is any */
/* Delete the pbuffer context if there is any */
if
(
This
->
pbufferContext
)
DestroyContext
(
This
,
This
->
pbufferContext
);
if
(
This
->
pbufferContext
)
context_destroy
(
This
,
This
->
pbufferContext
);
/* Delete the mouse cursor texture */
/* Delete the mouse cursor texture */
if
(
This
->
cursorTexture
)
{
if
(
This
->
cursorTexture
)
{
...
@@ -6658,8 +6658,9 @@ void delete_opengl_contexts(IWineD3DDevice *iface, IWineD3DSwapChain *swapchain_
...
@@ -6658,8 +6658,9 @@ void delete_opengl_contexts(IWineD3DDevice *iface, IWineD3DSwapChain *swapchain_
context_release
(
context
);
context_release
(
context
);
while
(
This
->
numContexts
)
{
while
(
This
->
numContexts
)
DestroyContext
(
This
,
This
->
contexts
[
0
]);
{
context_destroy
(
This
,
This
->
contexts
[
0
]);
}
}
HeapFree
(
GetProcessHeap
(),
0
,
swapchain
->
context
);
HeapFree
(
GetProcessHeap
(),
0
,
swapchain
->
context
);
swapchain
->
context
=
NULL
;
swapchain
->
context
=
NULL
;
...
...
dlls/wined3d/swapchain.c
View file @
e6ca176a
...
@@ -76,7 +76,7 @@ static void WINAPI IWineD3DSwapChainImpl_Destroy(IWineD3DSwapChain *iface)
...
@@ -76,7 +76,7 @@ static void WINAPI IWineD3DSwapChainImpl_Destroy(IWineD3DSwapChain *iface)
for
(
i
=
0
;
i
<
This
->
num_contexts
;
++
i
)
for
(
i
=
0
;
i
<
This
->
num_contexts
;
++
i
)
{
{
DestroyContext
(
This
->
wineD3DDevice
,
This
->
context
[
i
]);
context_destroy
(
This
->
wineD3DDevice
,
This
->
context
[
i
]);
}
}
/* Restore the screen resolution if we rendered in fullscreen
/* Restore the screen resolution if we rendered in fullscreen
* This will restore the screen resolution to what it was before creating the swapchain. In case of d3d8 and d3d9
* This will restore the screen resolution to what it was before creating the swapchain. In case of d3d8 and d3d9
...
@@ -354,7 +354,7 @@ static HRESULT WINAPI IWineD3DSwapChainImpl_SetDestWindowOverride(IWineD3DSwapCh
...
@@ -354,7 +354,7 @@ static HRESULT WINAPI IWineD3DSwapChainImpl_SetDestWindowOverride(IWineD3DSwapCh
memcpy
(
mem
,
r
.
pBits
,
r
.
Pitch
*
((
IWineD3DSurfaceImpl
*
)
This
->
backBuffer
[
0
])
->
currentDesc
.
Height
);
memcpy
(
mem
,
r
.
pBits
,
r
.
Pitch
*
((
IWineD3DSurfaceImpl
*
)
This
->
backBuffer
[
0
])
->
currentDesc
.
Height
);
IWineD3DSurface_UnlockRect
(
This
->
backBuffer
[
0
]);
IWineD3DSurface_UnlockRect
(
This
->
backBuffer
[
0
]);
DestroyContext
(
This
->
wineD3DDevice
,
This
->
context
[
0
]);
context_destroy
(
This
->
wineD3DDevice
,
This
->
context
[
0
]);
This
->
context
[
0
]
=
context_create
(
This
->
wineD3DDevice
,
(
IWineD3DSurfaceImpl
*
)
This
->
frontBuffer
,
This
->
context
[
0
]
=
context_create
(
This
->
wineD3DDevice
,
(
IWineD3DSurfaceImpl
*
)
This
->
frontBuffer
,
This
->
win_handle
,
FALSE
/* pbuffer */
,
&
This
->
presentParms
);
This
->
win_handle
,
FALSE
/* pbuffer */
,
&
This
->
presentParms
);
context_release
(
This
->
context
[
0
]);
context_release
(
This
->
context
[
0
]);
...
@@ -408,7 +408,7 @@ struct wined3d_context *swapchain_create_context_for_thread(IWineD3DSwapChain *i
...
@@ -408,7 +408,7 @@ struct wined3d_context *swapchain_create_context_for_thread(IWineD3DSwapChain *i
newArray
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
newArray
)
*
This
->
num_contexts
+
1
);
newArray
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
newArray
)
*
This
->
num_contexts
+
1
);
if
(
!
newArray
)
{
if
(
!
newArray
)
{
ERR
(
"Out of memory when trying to allocate a new context array
\n
"
);
ERR
(
"Out of memory when trying to allocate a new context array
\n
"
);
DestroyContext
(
This
->
wineD3DDevice
,
ctx
);
context_destroy
(
This
->
wineD3DDevice
,
ctx
);
return
NULL
;
return
NULL
;
}
}
memcpy
(
newArray
,
This
->
context
,
sizeof
(
*
newArray
)
*
This
->
num_contexts
);
memcpy
(
newArray
,
This
->
context
,
sizeof
(
*
newArray
)
*
This
->
num_contexts
);
...
...
dlls/wined3d/wined3d_private.h
View file @
e6ca176a
...
@@ -1164,7 +1164,6 @@ typedef enum ContextUsage {
...
@@ -1164,7 +1164,6 @@ typedef enum ContextUsage {
CTXUSAGE_CLEAR
=
4
,
/* Drawable and states are set up for clearing */
CTXUSAGE_CLEAR
=
4
,
/* Drawable and states are set up for clearing */
}
ContextUsage
;
}
ContextUsage
;
void
DestroyContext
(
IWineD3DDeviceImpl
*
This
,
struct
wined3d_context
*
context
)
DECLSPEC_HIDDEN
;
struct
wined3d_context
*
context_acquire
(
IWineD3DDeviceImpl
*
This
,
struct
wined3d_context
*
context_acquire
(
IWineD3DDeviceImpl
*
This
,
IWineD3DSurface
*
target
,
enum
ContextUsage
usage
)
DECLSPEC_HIDDEN
;
IWineD3DSurface
*
target
,
enum
ContextUsage
usage
)
DECLSPEC_HIDDEN
;
void
context_alloc_event_query
(
struct
wined3d_context
*
context
,
void
context_alloc_event_query
(
struct
wined3d_context
*
context
,
...
@@ -1180,6 +1179,7 @@ void context_attach_surface_fbo(const struct wined3d_context *context,
...
@@ -1180,6 +1179,7 @@ void context_attach_surface_fbo(const struct wined3d_context *context,
GLenum
fbo_target
,
DWORD
idx
,
IWineD3DSurface
*
surface
)
DECLSPEC_HIDDEN
;
GLenum
fbo_target
,
DWORD
idx
,
IWineD3DSurface
*
surface
)
DECLSPEC_HIDDEN
;
struct
wined3d_context
*
context_create
(
IWineD3DDeviceImpl
*
This
,
IWineD3DSurfaceImpl
*
target
,
HWND
win
,
struct
wined3d_context
*
context_create
(
IWineD3DDeviceImpl
*
This
,
IWineD3DSurfaceImpl
*
target
,
HWND
win
,
BOOL
create_pbuffer
,
const
WINED3DPRESENT_PARAMETERS
*
present_parameters
)
DECLSPEC_HIDDEN
;
BOOL
create_pbuffer
,
const
WINED3DPRESENT_PARAMETERS
*
present_parameters
)
DECLSPEC_HIDDEN
;
void
context_destroy
(
IWineD3DDeviceImpl
*
This
,
struct
wined3d_context
*
context
)
DECLSPEC_HIDDEN
;
void
context_free_event_query
(
struct
wined3d_event_query
*
query
)
DECLSPEC_HIDDEN
;
void
context_free_event_query
(
struct
wined3d_event_query
*
query
)
DECLSPEC_HIDDEN
;
void
context_free_occlusion_query
(
struct
wined3d_occlusion_query
*
query
)
DECLSPEC_HIDDEN
;
void
context_free_occlusion_query
(
struct
wined3d_occlusion_query
*
query
)
DECLSPEC_HIDDEN
;
struct
wined3d_context
*
context_get_current
(
void
)
DECLSPEC_HIDDEN
;
struct
wined3d_context
*
context_get_current
(
void
)
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