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
09b7d3bb
Commit
09b7d3bb
authored
Sep 17, 2007
by
Stefan Dösinger
Committed by
Alexandre Julliard
Sep 18, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Give GDI surfaces their own release implementation.
parent
3f0ea3d0
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
2 deletions
+40
-2
surface_gdi.c
dlls/wined3d/surface_gdi.c
+40
-1
wined3d_private.h
dlls/wined3d/wined3d_private.h
+0
-1
No files found.
dlls/wined3d/surface_gdi.c
View file @
09b7d3bb
...
...
@@ -129,6 +129,45 @@ x11_copy_to_screen(IWineD3DSurfaceImpl *This,
}
/*****************************************************************************
* IWineD3DSurface::Release, GDI version
*
* In general a normal COM Release method, but the GDI version doesn't have
* to destroy all the GL things.
*
*****************************************************************************/
ULONG
WINAPI
IWineGDISurfaceImpl_Release
(
IWineD3DSurface
*
iface
)
{
IWineD3DSurfaceImpl
*
This
=
(
IWineD3DSurfaceImpl
*
)
iface
;
ULONG
ref
=
InterlockedDecrement
(
&
This
->
resource
.
ref
);
TRACE
(
"(%p) : Releasing from %d
\n
"
,
This
,
ref
+
1
);
if
(
ref
==
0
)
{
IWineD3DDeviceImpl
*
device
=
(
IWineD3DDeviceImpl
*
)
This
->
resource
.
wineD3DDevice
;
TRACE
(
"(%p) : cleaning up
\n
"
,
This
);
if
(
This
->
Flags
&
SFLAG_DIBSECTION
)
{
/* Release the DC */
SelectObject
(
This
->
hDC
,
This
->
dib
.
holdbitmap
);
DeleteDC
(
This
->
hDC
);
/* Release the DIB section */
DeleteObject
(
This
->
dib
.
DIBsection
);
This
->
dib
.
bitmap_data
=
NULL
;
This
->
resource
.
allocatedMemory
=
NULL
;
}
if
(
This
->
Flags
&
SFLAG_USERPTR
)
IWineD3DSurface_SetMem
(
iface
,
NULL
);
HeapFree
(
GetProcessHeap
(),
0
,
This
->
palette9
);
IWineD3DResourceImpl_CleanUp
((
IWineD3DResource
*
)
iface
);
if
(
iface
==
device
->
ddraw_primary
)
device
->
ddraw_primary
=
NULL
;
TRACE
(
"(%p) Released
\n
"
,
This
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
return
ref
;
}
/*****************************************************************************
* IWineD3DSurface::PreLoad, GDI version
*
* This call is unsupported on GDI surfaces, if it's called something went
...
...
@@ -1698,7 +1737,7 @@ const IWineD3DSurfaceVtbl IWineGDISurface_Vtbl =
/* IUnknown */
IWineD3DBaseSurfaceImpl_QueryInterface
,
IWineD3DBaseSurfaceImpl_AddRef
,
IWine
D3D
SurfaceImpl_Release
,
IWine
GDI
SurfaceImpl_Release
,
/* IWineD3DResource */
IWineD3DBaseSurfaceImpl_GetParent
,
IWineD3DBaseSurfaceImpl_GetDevice
,
...
...
dlls/wined3d/wined3d_private.h
View file @
09b7d3bb
...
...
@@ -1171,7 +1171,6 @@ HRESULT WINAPI IWineD3DBaseSurfaceImpl_GetClipper(IWineD3DSurface *iface, IWineD
HRESULT
WINAPI
IWineD3DBaseSurfaceImpl_SetFormat
(
IWineD3DSurface
*
iface
,
WINED3DFORMAT
format
);
HRESULT
IWineD3DBaseSurfaceImpl_CreateDIBSection
(
IWineD3DSurface
*
iface
);
ULONG
WINAPI
IWineD3DSurfaceImpl_Release
(
IWineD3DSurface
*
iface
);
const
void
*
WINAPI
IWineD3DSurfaceImpl_GetData
(
IWineD3DSurface
*
iface
);
HRESULT
WINAPI
IWineGDISurfaceImpl_Blt
(
IWineD3DSurface
*
iface
,
RECT
*
DestRect
,
IWineD3DSurface
*
SrcSurface
,
RECT
*
SrcRect
,
DWORD
Flags
,
WINEDDBLTFX
*
DDBltFx
,
WINED3DTEXTUREFILTERTYPE
Filter
);
...
...
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