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
23a377f0
Commit
23a377f0
authored
Apr 28, 2010
by
Henri Verbeet
Committed by
Alexandre Julliard
Apr 28, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Simply pass an IWineD3DSurfaceImpl pointer to surface_init_sysmem().
parent
5ac7b165
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
14 deletions
+15
-14
device.c
dlls/wined3d/device.c
+1
-1
surface.c
dlls/wined3d/surface.c
+13
-12
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-1
No files found.
dlls/wined3d/device.c
View file @
23a377f0
...
...
@@ -6234,7 +6234,7 @@ static HRESULT updateSurfaceDesc(IWineD3DSurfaceImpl *surface, const WINED3DPRES
/* Put all surfaces into sysmem - the drawable might disappear if the backbuffer was rendered
* to a FBO */
if
(
!
surface_init_sysmem
((
IWineD3DSurface
*
)
surface
))
if
(
!
surface_init_sysmem
(
surface
))
{
return
E_OUTOFMEMORY
;
}
...
...
dlls/wined3d/surface.c
View file @
23a377f0
...
...
@@ -1141,27 +1141,26 @@ static void surface_remove_pbo(IWineD3DSurfaceImpl *This, const struct wined3d_g
This
->
Flags
&=
~
SFLAG_PBO
;
}
BOOL
surface_init_sysmem
(
IWineD3DSurface
*
i
face
)
BOOL
surface_init_sysmem
(
IWineD3DSurface
Impl
*
sur
face
)
{
IWineD3DSurfaceImpl
*
This
=
(
IWineD3DSurfaceImpl
*
)
iface
;
if
(
!
This
->
resource
.
allocatedMemory
)
if
(
!
surface
->
resource
.
allocatedMemory
)
{
This
->
resource
.
heapMemory
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
This
->
resource
.
size
+
RESOURCE_ALIGNMENT
);
if
(
!
This
->
resource
.
heapMemory
)
surface
->
resource
.
heapMemory
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
surface
->
resource
.
size
+
RESOURCE_ALIGNMENT
);
if
(
!
surface
->
resource
.
heapMemory
)
{
ERR
(
"Out of memory
\n
"
);
return
FALSE
;
}
This
->
resource
.
allocatedMemory
=
(
BYTE
*
)(((
ULONG_PTR
)
This
->
resource
.
heapMemory
+
(
RESOURCE_ALIGNMENT
-
1
))
&
~
(
RESOURCE_ALIGNMENT
-
1
));
surface
->
resource
.
allocatedMemory
=
(
BYTE
*
)(((
ULONG_PTR
)
surface
->
resource
.
heapMemory
+
(
RESOURCE_ALIGNMENT
-
1
))
&
~
(
RESOURCE_ALIGNMENT
-
1
));
}
else
{
memset
(
This
->
resource
.
allocatedMemory
,
0
,
This
->
resource
.
size
);
memset
(
surface
->
resource
.
allocatedMemory
,
0
,
surface
->
resource
.
size
);
}
IWineD3DSurface_ModifyLocation
(
i
face
,
SFLAG_INSYSMEM
,
TRUE
);
IWineD3DSurface_ModifyLocation
(
(
IWineD3DSurface
*
)
sur
face
,
SFLAG_INSYSMEM
,
TRUE
);
return
TRUE
;
}
...
...
@@ -1186,8 +1185,10 @@ static void WINAPI IWineD3DSurfaceImpl_UnLoad(IWineD3DSurface *iface) {
* or the depth stencil into an FBO the texture or render buffer will be removed
* and all flags get lost
*/
surface_init_sysmem
(
iface
);
}
else
{
surface_init_sysmem
(
This
);
}
else
{
/* Load the surface into system memory */
IWineD3DSurface_LoadLocation
(
iface
,
SFLAG_INSYSMEM
,
NULL
);
IWineD3DSurface_ModifyLocation
(
iface
,
SFLAG_INDRAWABLE
,
FALSE
);
...
...
dlls/wined3d/wined3d_private.h
View file @
23a377f0
...
...
@@ -1873,7 +1873,7 @@ typedef struct IWineD3DBaseTextureClass
}
IWineD3DBaseTextureClass
;
void
surface_internal_preload
(
IWineD3DSurfaceImpl
*
surface
,
enum
WINED3DSRGB
srgb
)
DECLSPEC_HIDDEN
;
BOOL
surface_init_sysmem
(
IWineD3DSurface
*
i
face
)
DECLSPEC_HIDDEN
;
BOOL
surface_init_sysmem
(
IWineD3DSurface
Impl
*
sur
face
)
DECLSPEC_HIDDEN
;
BOOL
surface_is_offscreen
(
IWineD3DSurfaceImpl
*
iface
)
DECLSPEC_HIDDEN
;
void
surface_prepare_texture
(
IWineD3DSurfaceImpl
*
surface
,
const
struct
wined3d_gl_info
*
gl_info
,
BOOL
srgb
)
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