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
62acb2fd
Commit
62acb2fd
authored
Apr 26, 2010
by
Henri Verbeet
Committed by
Alexandre Julliard
Apr 27, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Store the front buffer surface as an IWineD3DSurfaceImpl pointer in the swapchain.
parent
ab788c7c
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
57 additions
and
54 deletions
+57
-54
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+2
-2
context.c
dlls/wined3d/context.c
+1
-1
device.c
dlls/wined3d/device.c
+14
-13
surface.c
dlls/wined3d/surface.c
+7
-8
surface_gdi.c
dlls/wined3d/surface_gdi.c
+3
-3
swapchain.c
dlls/wined3d/swapchain.c
+22
-20
swapchain_base.c
dlls/wined3d/swapchain_base.c
+1
-1
swapchain_gdi.c
dlls/wined3d/swapchain_gdi.c
+6
-5
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-1
No files found.
dlls/wined3d/arb_program_shader.c
View file @
62acb2fd
...
...
@@ -6917,7 +6917,7 @@ HRESULT arbfp_blit_surface(IWineD3DDeviceImpl *device, IWineD3DSurfaceImpl *src_
* Also beware that the front buffer's surface size is screen width x screen height,
* whereas the real gl drawable size is the size of the window. */
dst_swapchain
=
(
dst_surface
->
Flags
&
SFLAG_SWAPCHAIN
)
?
(
IWineD3DSwapChainImpl
*
)
dst_surface
->
container
:
NULL
;
if
(
dst_swapchain
&&
(
IWineD3DSurface
*
)
dst_surface
==
dst_swapchain
->
frontB
uffer
)
if
(
dst_swapchain
&&
dst_surface
==
dst_swapchain
->
front_b
uffer
)
{
RECT
windowsize
;
POINT
offset
=
{
0
,
0
};
...
...
@@ -6943,7 +6943,7 @@ HRESULT arbfp_blit_surface(IWineD3DDeviceImpl *device, IWineD3DSurfaceImpl *src_
arbfp_blit_unset
((
IWineD3DDevice
*
)
device
);
if
(
wined3d_settings
.
strict_draw_ordering
||
(
dst_swapchain
&&
(
(
IWineD3DSurface
*
)
dst_surface
==
dst_swapchain
->
frontB
uffer
&&
(
dst_surface
==
dst_swapchain
->
front_b
uffer
||
dst_swapchain
->
num_contexts
>
1
)))
wglFlush
();
/* Flush to ensure ordering across contexts. */
...
...
dlls/wined3d/context.c
View file @
62acb2fd
...
...
@@ -1828,7 +1828,7 @@ static struct wined3d_context *FindContext(IWineD3DDeviceImpl *This, IWineD3DSur
{
IWineD3DSwapChainImpl
*
swapchain
=
(
IWineD3DSwapChainImpl
*
)
This
->
swapchains
[
0
];
if
(
swapchain
->
backBuffer
)
target
=
(
IWineD3DSurfaceImpl
*
)
swapchain
->
backBuffer
[
0
];
else
target
=
(
IWineD3DSurfaceImpl
*
)
swapchain
->
frontB
uffer
;
else
target
=
swapchain
->
front_b
uffer
;
}
}
...
...
dlls/wined3d/device.c
View file @
62acb2fd
...
...
@@ -1626,9 +1626,10 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Init3D(IWineD3DDevice *iface,
TRACE
(
"Setting rendertarget to %p
\n
"
,
swapchain
->
backBuffer
);
This
->
render_targets
[
0
]
=
(
IWineD3DSurfaceImpl
*
)
swapchain
->
backBuffer
[
0
];
}
else
{
TRACE
(
"Setting rendertarget to %p
\n
"
,
swapchain
->
frontBuffer
);
This
->
render_targets
[
0
]
=
(
IWineD3DSurfaceImpl
*
)
swapchain
->
frontBuffer
;
else
{
TRACE
(
"Setting rendertarget to %p.
\n
"
,
swapchain
->
front_buffer
);
This
->
render_targets
[
0
]
=
swapchain
->
front_buffer
;
}
IWineD3DSurface_AddRef
((
IWineD3DSurface
*
)
This
->
render_targets
[
0
]);
...
...
@@ -1658,7 +1659,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Init3D(IWineD3DDevice *iface,
/* Setup all the devices defaults */
IWineD3DStateBlock_InitStartupStateBlock
((
IWineD3DStateBlock
*
)
This
->
stateBlock
);
context
=
context_acquire
(
This
,
(
IWineD3DSurfaceImpl
*
)
swapchain
->
frontB
uffer
,
CTXUSAGE_RESOURCELOAD
);
context
=
context_acquire
(
This
,
swapchain
->
front_b
uffer
,
CTXUSAGE_RESOURCELOAD
);
create_dummy_textures
(
This
);
...
...
@@ -4535,7 +4536,7 @@ HRESULT IWineD3DDeviceImpl_ClearSurface(IWineD3DDeviceImpl *This, IWineD3DSurfac
LEAVE_GL
();
if
(
wined3d_settings
.
strict_draw_ordering
||
((
target
->
Flags
&
SFLAG_SWAPCHAIN
)
&&
((
IWineD3DSwapChainImpl
*
)
target
->
container
)
->
front
Buffer
==
(
IWineD3DSurface
*
)
target
))
&&
((
IWineD3DSwapChainImpl
*
)
target
->
container
)
->
front
_buffer
==
target
))
wglFlush
();
/* Flush to ensure ordering across contexts. */
context_release
(
context
);
...
...
@@ -5656,16 +5657,16 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetFrontBackBuffers(IWineD3DDevice *ifa
}
}
if
(
swapchain
->
front
Buffer
!=
front
)
if
(
swapchain
->
front
_buffer
!=
front_impl
)
{
TRACE
(
"Changing the front buffer from %p to %p.
\n
"
,
swapchain
->
front
Buffer
,
front
);
TRACE
(
"Changing the front buffer from %p to %p.
\n
"
,
swapchain
->
front
_buffer
,
front_impl
);
if
(
swapchain
->
front
B
uffer
)
if
(
swapchain
->
front
_b
uffer
)
{
IWineD3DSurface_SetContainer
(
swapchain
->
frontB
uffer
,
NULL
);
((
IWineD3DSurfaceImpl
*
)
swapchain
->
frontBuffer
)
->
Flags
&=
~
SFLAG_SWAPCHAIN
;
IWineD3DSurface_SetContainer
(
(
IWineD3DSurface
*
)
swapchain
->
front_b
uffer
,
NULL
);
swapchain
->
front_buffer
->
Flags
&=
~
SFLAG_SWAPCHAIN
;
}
swapchain
->
front
Buffer
=
front
;
swapchain
->
front
_buffer
=
front_impl
;
if
(
front
)
{
...
...
@@ -6332,7 +6333,7 @@ static HRESULT create_primary_opengl_context(IWineD3DDevice *iface, IWineD3DSwap
return
E_OUTOFMEMORY
;
}
target
=
(
IWineD3DSurfaceImpl
*
)(
swapchain
->
backBuffer
?
swapchain
->
backBuffer
[
0
]
:
swapchain
->
frontBuffer
)
;
target
=
swapchain
->
backBuffer
?
(
IWineD3DSurfaceImpl
*
)
swapchain
->
backBuffer
[
0
]
:
swapchain
->
front_buffer
;
if
(
!
(
context
=
context_create
(
swapchain
,
target
,
swapchain
->
ds_format
)))
{
WARN
(
"Failed to create context.
\n
"
);
...
...
@@ -6510,7 +6511,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Reset(IWineD3DDevice* iface, WINED3DPRE
swapchain
->
presentParms
.
BackBufferWidth
=
pPresentationParameters
->
BackBufferWidth
;
swapchain
->
presentParms
.
BackBufferHeight
=
pPresentationParameters
->
BackBufferHeight
;
hr
=
updateSurfaceDesc
(
(
IWineD3DSurfaceImpl
*
)
swapchain
->
frontB
uffer
,
pPresentationParameters
);
hr
=
updateSurfaceDesc
(
swapchain
->
front_b
uffer
,
pPresentationParameters
);
if
(
FAILED
(
hr
))
{
IWineD3DSwapChain_Release
((
IWineD3DSwapChain
*
)
swapchain
);
...
...
dlls/wined3d/surface.c
View file @
62acb2fd
...
...
@@ -945,7 +945,7 @@ GLenum surface_get_gl_buffer(IWineD3DSurfaceImpl *surface)
TRACE
(
"Returning GL_BACK
\n
"
);
return
GL_BACK
;
}
else
if
(
(
IWineD3DSurfaceImpl
*
)
swapchain
->
frontBuffer
==
surface
)
else
if
(
surface
==
swapchain
->
front_buffer
)
{
TRACE
(
"Returning GL_FRONT
\n
"
);
return
GL_FRONT
;
...
...
@@ -2095,7 +2095,7 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_GetDC(IWineD3DSurface *iface, HDC *pHD
IWineD3DSurfaceImpl
*
dds_primary
;
IWineD3DSwapChainImpl
*
swapchain
;
swapchain
=
(
IWineD3DSwapChainImpl
*
)
This
->
resource
.
device
->
swapchains
[
0
];
dds_primary
=
(
IWineD3DSurfaceImpl
*
)
swapchain
->
frontB
uffer
;
dds_primary
=
swapchain
->
front_b
uffer
;
if
(
dds_primary
&&
dds_primary
->
palette
)
pal
=
dds_primary
->
palette
->
palents
;
}
...
...
@@ -3439,7 +3439,7 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *dst_surface,
/* The only case where both surfaces on a swapchain are supported is a back buffer -> front buffer blit on the same swapchain */
if
(
dstSwapchain
&&
dstSwapchain
==
srcSwapchain
&&
dstSwapchain
->
backBuffer
&&
dst_surface
==
(
IWineD3DSurfaceImpl
*
)
dstSwapchain
->
frontB
uffer
&&
dst_surface
==
dstSwapchain
->
front_b
uffer
&&
src_surface
==
(
IWineD3DSurfaceImpl
*
)
dstSwapchain
->
backBuffer
[
0
])
{
/* Half-life does a Blt from the back buffer to the front buffer,
...
...
@@ -3685,7 +3685,7 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *dst_surface,
* Also beware that the front buffer's surface size is screen width x screen height,
* whereas the real gl drawable size is the size of the window.
*/
if
(
dstSwapchain
&&
dst_surface
==
(
IWineD3DSurfaceImpl
*
)
dstSwapchain
->
frontB
uffer
)
if
(
dstSwapchain
&&
dst_surface
==
dstSwapchain
->
front_b
uffer
)
{
RECT
windowsize
;
POINT
offset
=
{
0
,
0
};
...
...
@@ -3748,7 +3748,7 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *dst_surface,
device
->
blitter
->
unset_shader
((
IWineD3DDevice
*
)
device
);
if
(
wined3d_settings
.
strict_draw_ordering
||
(
dstSwapchain
&&
(
dst_surface
==
(
IWineD3DSurfaceImpl
*
)
dstSwapchain
->
frontB
uffer
&&
(
dst_surface
==
dstSwapchain
->
front_b
uffer
||
dstSwapchain
->
num_contexts
>
1
)))
wglFlush
();
/* Flush to ensure ordering across contexts. */
...
...
@@ -4347,8 +4347,7 @@ static inline void surface_blt_to_drawable(IWineD3DSurfaceImpl *This, const RECT
swapchain
=
(
This
->
Flags
&
SFLAG_SWAPCHAIN
)
?
(
IWineD3DSwapChainImpl
*
)
This
->
container
:
NULL
;
if
(
wined3d_settings
.
strict_draw_ordering
||
(
swapchain
&&
((
IWineD3DSurface
*
)
This
==
swapchain
->
frontBuffer
||
swapchain
->
num_contexts
>
1
)))
&&
(
This
==
swapchain
->
front_buffer
||
swapchain
->
num_contexts
>
1
)))
wglFlush
();
/* Flush to ensure ordering across contexts. */
context_release
(
context
);
...
...
@@ -4678,7 +4677,7 @@ BOOL surface_is_offscreen(IWineD3DSurfaceImpl *surface)
if
(
!
(
surface
->
Flags
&
SFLAG_SWAPCHAIN
))
return
TRUE
;
/* The front buffer is always onscreen */
if
(
surface
==
(
IWineD3DSurfaceImpl
*
)
swapchain
->
frontB
uffer
)
return
FALSE
;
if
(
surface
==
swapchain
->
front_b
uffer
)
return
FALSE
;
/* If the swapchain is rendered to an FBO, the backbuffer is
* offscreen, otherwise onscreen */
...
...
dlls/wined3d/surface_gdi.c
View file @
62acb2fd
...
...
@@ -200,7 +200,7 @@ IWineGDISurfaceImpl_UnlockRect(IWineD3DSurface *iface)
/* Tell the swapchain to update the screen */
if
(
SUCCEEDED
(
IWineD3DSurface_GetContainer
(
iface
,
&
IID_IWineD3DSwapChain
,
(
void
**
)
&
swapchain
)))
{
if
(
iface
==
swapchain
->
frontB
uffer
)
if
(
This
==
swapchain
->
front_b
uffer
)
{
x11_copy_to_screen
(
swapchain
,
&
This
->
lockedRect
);
}
...
...
@@ -431,7 +431,7 @@ static HRESULT WINAPI IWineGDISurfaceImpl_GetDC(IWineD3DSurface *iface, HDC *pHD
IWineD3DSurfaceImpl
*
dds_primary
;
IWineD3DSwapChainImpl
*
swapchain
;
swapchain
=
(
IWineD3DSwapChainImpl
*
)
This
->
resource
.
device
->
swapchains
[
0
];
dds_primary
=
(
IWineD3DSurfaceImpl
*
)
swapchain
->
frontB
uffer
;
dds_primary
=
swapchain
->
front_b
uffer
;
if
(
dds_primary
&&
dds_primary
->
palette
)
pal
=
dds_primary
->
palette
->
palents
;
}
...
...
@@ -501,7 +501,7 @@ static HRESULT WINAPI IWineGDISurfaceImpl_RealizePalette(IWineD3DSurface *iface)
/* Tell the swapchain to update the screen */
if
(
SUCCEEDED
(
IWineD3DSurface_GetContainer
(
iface
,
&
IID_IWineD3DSwapChain
,
(
void
**
)
&
swapchain
)))
{
if
(
iface
==
swapchain
->
frontB
uffer
)
if
(
This
==
swapchain
->
front_b
uffer
)
{
x11_copy_to_screen
(
swapchain
,
NULL
);
}
...
...
dlls/wined3d/swapchain.c
View file @
62acb2fd
...
...
@@ -48,15 +48,15 @@ static void WINAPI IWineD3DSwapChainImpl_Destroy(IWineD3DSwapChain *iface)
/* Release the swapchain's draw buffers. Make sure This->backBuffer[0] is
* the last buffer to be destroyed, FindContext() depends on that. */
if
(
This
->
front
B
uffer
)
if
(
This
->
front
_b
uffer
)
{
IWineD3DSurface_SetContainer
(
This
->
frontBuffer
,
0
);
if
(
IWineD3DSurface_Release
(
This
->
frontB
uffer
))
IWineD3DSurface_SetContainer
(
(
IWineD3DSurface
*
)
This
->
front_buffer
,
NULL
);
if
(
IWineD3DSurface_Release
(
(
IWineD3DSurface
*
)
This
->
front_b
uffer
))
{
WARN
(
"(%p) Something's still holding the front buffer (%p).
\n
"
,
This
,
This
->
front
B
uffer
);
This
,
This
->
front
_b
uffer
);
}
This
->
front
B
uffer
=
NULL
;
This
->
front
_b
uffer
=
NULL
;
}
if
(
This
->
backBuffer
)
...
...
@@ -423,13 +423,13 @@ static HRESULT WINAPI IWineD3DSwapChainImpl_Present(IWineD3DSwapChain *iface, CO
WINED3DCLEAR_TARGET
,
0xff00ffff
,
1
.
0
f
,
0
);
}
if
(
!
This
->
render_to_fbo
&&
(
((
IWineD3DSurfaceImpl
*
)
This
->
frontBuffer
)
->
Flags
&
SFLAG_INSYSMEM
||
((
IWineD3DSurfaceImpl
*
)
This
->
backBuffer
[
0
])
->
Flags
&
SFLAG_INSYSMEM
)
)
{
if
(
!
This
->
render_to_fbo
&&
((
This
->
front_buffer
->
Flags
&
SFLAG_INSYSMEM
)
||
(((
IWineD3DSurfaceImpl
*
)
This
->
backBuffer
[
0
])
->
Flags
&
SFLAG_INSYSMEM
)))
{
/* Both memory copies of the surfaces are ok, flip them around too instead of dirtifying
* Doesn't work with render_to_fbo because we're not flipping
*/
IWineD3DSurfaceImpl
*
front
=
(
IWineD3DSurfaceImpl
*
)
This
->
frontB
uffer
;
IWineD3DSurfaceImpl
*
front
=
This
->
front_b
uffer
;
IWineD3DSurfaceImpl
*
back
=
(
IWineD3DSurfaceImpl
*
)
This
->
backBuffer
[
0
];
if
(
front
->
resource
.
size
==
back
->
resource
.
size
)
{
...
...
@@ -441,14 +441,16 @@ static HRESULT WINAPI IWineD3DSwapChainImpl_Present(IWineD3DSwapChain *iface, CO
* This serves to update the emulated overlay, if any
*/
fbflags
=
front
->
Flags
;
IWineD3DSurface_ModifyLocation
(
This
->
frontBuffer
,
SFLAG_INDRAWABLE
,
TRUE
);
IWineD3DSurface_ModifyLocation
(
(
IWineD3DSurface
*
)
front
,
SFLAG_INDRAWABLE
,
TRUE
);
front
->
Flags
=
fbflags
;
}
else
{
IWineD3DSurface_ModifyLocation
((
IWineD3DSurface
*
)
front
,
SFLAG_INDRAWABLE
,
TRUE
);
IWineD3DSurface_ModifyLocation
((
IWineD3DSurface
*
)
back
,
SFLAG_INDRAWABLE
,
TRUE
);
}
}
else
{
IWineD3DSurface_ModifyLocation
(
This
->
frontBuffer
,
SFLAG_INDRAWABLE
,
TRUE
);
}
else
{
IWineD3DSurface_ModifyLocation
((
IWineD3DSurface
*
)
This
->
front_buffer
,
SFLAG_INDRAWABLE
,
TRUE
);
/* If the swapeffect is DISCARD, the back buffer is undefined. That means the SYSMEM
* and INTEXTURE copies can keep their old content if they have any defined content.
* If the swapeffect is COPY, the content remains the same. If it is FLIP however,
...
...
@@ -746,18 +748,19 @@ HRESULT swapchain_init(IWineD3DSwapChainImpl *swapchain, WINED3DSURFTYPE surface
hr
=
IWineD3DDeviceParent_CreateRenderTarget
(
device
->
device_parent
,
parent
,
swapchain
->
presentParms
.
BackBufferWidth
,
swapchain
->
presentParms
.
BackBufferHeight
,
swapchain
->
presentParms
.
BackBufferFormat
,
swapchain
->
presentParms
.
MultiSampleType
,
swapchain
->
presentParms
.
MultiSampleQuality
,
TRUE
/* Lockable */
,
&
swapchain
->
frontBuffer
);
swapchain
->
presentParms
.
MultiSampleQuality
,
TRUE
/* Lockable */
,
(
IWineD3DSurface
**
)
&
swapchain
->
front_buffer
);
if
(
FAILED
(
hr
))
{
WARN
(
"Failed to create front buffer, hr %#x.
\n
"
,
hr
);
goto
err
;
}
IWineD3DSurface_SetContainer
(
swapchain
->
frontB
uffer
,
(
IWineD3DBase
*
)
swapchain
);
((
IWineD3DSurfaceImpl
*
)
swapchain
->
frontBuffer
)
->
Flags
|=
SFLAG_SWAPCHAIN
;
IWineD3DSurface_SetContainer
(
(
IWineD3DSurface
*
)
swapchain
->
front_b
uffer
,
(
IWineD3DBase
*
)
swapchain
);
swapchain
->
front_buffer
->
Flags
|=
SFLAG_SWAPCHAIN
;
if
(
surface_type
==
SURFACE_OPENGL
)
{
IWineD3DSurface_ModifyLocation
(
swapchain
->
frontB
uffer
,
SFLAG_INDRAWABLE
,
TRUE
);
IWineD3DSurface_ModifyLocation
(
(
IWineD3DSurface
*
)
swapchain
->
front_b
uffer
,
SFLAG_INDRAWABLE
,
TRUE
);
}
/* MSDN says we're only allowed a single fullscreen swapchain per device,
...
...
@@ -813,8 +816,7 @@ HRESULT swapchain_init(IWineD3DSwapChainImpl *swapchain, WINED3DSURFTYPE surface
FIXME
(
"Add OpenGL context recreation support to context_validate_onscreen_formats
\n
"
);
}
swapchain
->
ds_format
=
getFormatDescEntry
(
WINED3DFMT_D24_UNORM_S8_UINT
,
gl_info
);
swapchain
->
context
[
0
]
=
context_create
(
swapchain
,
(
IWineD3DSurfaceImpl
*
)
swapchain
->
frontBuffer
,
swapchain
->
ds_format
);
swapchain
->
context
[
0
]
=
context_create
(
swapchain
,
swapchain
->
front_buffer
,
swapchain
->
ds_format
);
if
(
!
swapchain
->
context
[
0
])
{
WARN
(
"Failed to create context.
\n
"
);
...
...
@@ -919,7 +921,7 @@ err:
HeapFree
(
GetProcessHeap
(),
0
,
swapchain
->
context
);
}
if
(
swapchain
->
front
Buffer
)
IWineD3DSurface_Release
(
swapchain
->
frontB
uffer
);
if
(
swapchain
->
front
_buffer
)
IWineD3DSurface_Release
((
IWineD3DSurface
*
)
swapchain
->
front_b
uffer
);
return
hr
;
}
...
...
@@ -932,7 +934,7 @@ struct wined3d_context *swapchain_create_context_for_thread(IWineD3DSwapChain *i
TRACE
(
"Creating a new context for swapchain %p, thread %d
\n
"
,
This
,
GetCurrentThreadId
());
if
(
!
(
ctx
=
context_create
(
This
,
(
IWineD3DSurfaceImpl
*
)
This
->
frontB
uffer
,
This
->
ds_format
)))
if
(
!
(
ctx
=
context_create
(
This
,
This
->
front_b
uffer
,
This
->
ds_format
)))
{
ERR
(
"Failed to create a new context for the swapchain
\n
"
);
return
NULL
;
...
...
dlls/wined3d/swapchain_base.c
View file @
62acb2fd
...
...
@@ -85,7 +85,7 @@ HRESULT WINAPI IWineD3DBaseSwapChainImpl_GetFrontBufferData(IWineD3DSwapChain *i
MapWindowPoints
(
This
->
win_handle
,
NULL
,
&
start
,
1
);
}
IWineD3DSurface_BltFast
(
pDestSurface
,
start
.
x
,
start
.
y
,
This
->
frontB
uffer
,
NULL
,
0
);
IWineD3DSurface_BltFast
(
pDestSurface
,
start
.
x
,
start
.
y
,
(
IWineD3DSurface
*
)
This
->
front_b
uffer
,
NULL
,
0
);
return
WINED3D_OK
;
}
...
...
dlls/wined3d/swapchain_gdi.c
View file @
62acb2fd
...
...
@@ -37,9 +37,10 @@ static void WINAPI IWineGDISwapChainImpl_Destroy(IWineD3DSwapChain *iface)
IWineD3DSwapChain_SetGammaRamp
(
iface
,
0
,
&
This
->
orig_gamma
);
/* release the ref to the front and back buffer parents */
if
(
This
->
frontBuffer
)
{
IWineD3DSurface_SetContainer
(
This
->
frontBuffer
,
0
);
if
(
IWineD3DSurface_Release
(
This
->
frontBuffer
)
>
0
)
if
(
This
->
front_buffer
)
{
IWineD3DSurface_SetContainer
((
IWineD3DSurface
*
)
This
->
front_buffer
,
NULL
);
if
(
IWineD3DSurface_Release
((
IWineD3DSurface
*
)
This
->
front_buffer
)
>
0
)
{
WARN
(
"(%p) Something's still holding the front buffer
\n
"
,
This
);
}
...
...
@@ -86,7 +87,7 @@ static void WINAPI IWineGDISwapChainImpl_Destroy(IWineD3DSwapChain *iface)
*****************************************************************************/
void
x11_copy_to_screen
(
IWineD3DSwapChainImpl
*
This
,
const
RECT
*
rc
)
{
IWineD3DSurfaceImpl
*
front
=
(
IWineD3DSurfaceImpl
*
)
This
->
frontB
uffer
;
IWineD3DSurfaceImpl
*
front
=
This
->
front_b
uffer
;
if
(
front
->
resource
.
usage
&
WINED3DUSAGE_RENDERTARGET
)
{
POINT
offset
=
{
0
,
0
};
...
...
@@ -176,7 +177,7 @@ static HRESULT WINAPI IWineGDISwapChainImpl_Present(IWineD3DSwapChain *iface, CO
WARN
(
"Swapchain doesn't have a backbuffer, returning WINED3DERR_INVALIDCALL
\n
"
);
return
WINED3DERR_INVALIDCALL
;
}
front
=
(
IWineD3DSurfaceImpl
*
)
This
->
frontB
uffer
;
front
=
This
->
front_b
uffer
;
back
=
(
IWineD3DSurfaceImpl
*
)
This
->
backBuffer
[
0
];
/* Flip the DC */
...
...
dlls/wined3d/wined3d_private.h
View file @
62acb2fd
...
...
@@ -2565,7 +2565,7 @@ struct IWineD3DSwapChainImpl
/* IWineD3DSwapChain fields */
IWineD3DSurface
**
backBuffer
;
IWineD3DSurface
*
frontB
uffer
;
IWineD3DSurface
Impl
*
front_b
uffer
;
WINED3DPRESENT_PARAMETERS
presentParms
;
DWORD
orig_width
,
orig_height
;
WINED3DFORMAT
orig_fmt
;
...
...
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