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
0d863237
Commit
0d863237
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_release_client_storage().
parent
23a377f0
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
19 deletions
+16
-19
surface.c
dlls/wined3d/surface.c
+16
-19
No files found.
dlls/wined3d/surface.c
View file @
0d863237
...
@@ -1993,25 +1993,24 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_UnlockRect(IWineD3DSurface *iface) {
...
@@ -1993,25 +1993,24 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_UnlockRect(IWineD3DSurface *iface) {
return
WINED3D_OK
;
return
WINED3D_OK
;
}
}
static
void
surface_release_client_storage
(
IWineD3DSurface
*
i
face
)
static
void
surface_release_client_storage
(
IWineD3DSurface
Impl
*
sur
face
)
{
{
IWineD3DSurfaceImpl
*
This
=
(
IWineD3DSurfaceImpl
*
)
iface
;
struct
wined3d_context
*
context
;
struct
wined3d_context
*
context
;
context
=
context_acquire
(
This
->
resource
.
device
,
NULL
,
CTXUSAGE_RESOURCELOAD
);
context
=
context_acquire
(
surface
->
resource
.
device
,
NULL
,
CTXUSAGE_RESOURCELOAD
);
ENTER_GL
();
ENTER_GL
();
glPixelStorei
(
GL_UNPACK_CLIENT_STORAGE_APPLE
,
GL_FALSE
);
glPixelStorei
(
GL_UNPACK_CLIENT_STORAGE_APPLE
,
GL_FALSE
);
if
(
This
->
texture_name
)
if
(
surface
->
texture_name
)
{
{
surface_bind_and_dirtify
(
This
,
FALSE
);
surface_bind_and_dirtify
(
surface
,
FALSE
);
glTexImage2D
(
This
->
texture_target
,
This
->
texture_level
,
glTexImage2D
(
surface
->
texture_target
,
surface
->
texture_level
,
GL_RGB
,
1
,
1
,
0
,
GL_RGB
,
GL_UNSIGNED_BYTE
,
NULL
);
GL_RGB
,
1
,
1
,
0
,
GL_RGB
,
GL_UNSIGNED_BYTE
,
NULL
);
}
}
if
(
This
->
texture_name_srgb
)
if
(
surface
->
texture_name_srgb
)
{
{
surface_bind_and_dirtify
(
This
,
TRUE
);
surface_bind_and_dirtify
(
surface
,
TRUE
);
glTexImage2D
(
This
->
texture_target
,
This
->
texture_level
,
glTexImage2D
(
surface
->
texture_target
,
surface
->
texture_level
,
GL_RGB
,
1
,
1
,
0
,
GL_RGB
,
GL_UNSIGNED_BYTE
,
NULL
);
GL_RGB
,
1
,
1
,
0
,
GL_RGB
,
GL_UNSIGNED_BYTE
,
NULL
);
}
}
glPixelStorei
(
GL_UNPACK_CLIENT_STORAGE_APPLE
,
GL_TRUE
);
glPixelStorei
(
GL_UNPACK_CLIENT_STORAGE_APPLE
,
GL_TRUE
);
...
@@ -2019,9 +2018,9 @@ static void surface_release_client_storage(IWineD3DSurface *iface)
...
@@ -2019,9 +2018,9 @@ static void surface_release_client_storage(IWineD3DSurface *iface)
LEAVE_GL
();
LEAVE_GL
();
context_release
(
context
);
context_release
(
context
);
IWineD3DSurface_ModifyLocation
(
i
face
,
SFLAG_INSRGBTEX
,
FALSE
);
IWineD3DSurface_ModifyLocation
(
(
IWineD3DSurface
*
)
sur
face
,
SFLAG_INSRGBTEX
,
FALSE
);
IWineD3DSurface_ModifyLocation
(
i
face
,
SFLAG_INTEXTURE
,
FALSE
);
IWineD3DSurface_ModifyLocation
(
(
IWineD3DSurface
*
)
sur
face
,
SFLAG_INTEXTURE
,
FALSE
);
surface_force_reload
(
This
);
surface_force_reload
(
surface
);
}
}
static
HRESULT
WINAPI
IWineD3DSurfaceImpl_GetDC
(
IWineD3DSurface
*
iface
,
HDC
*
pHDC
)
static
HRESULT
WINAPI
IWineD3DSurfaceImpl_GetDC
(
IWineD3DSurface
*
iface
,
HDC
*
pHDC
)
...
@@ -2052,7 +2051,7 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_GetDC(IWineD3DSurface *iface, HDC *pHD
...
@@ -2052,7 +2051,7 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_GetDC(IWineD3DSurface *iface, HDC *pHD
if
(
!
This
->
hDC
)
{
if
(
!
This
->
hDC
)
{
if
(
This
->
Flags
&
SFLAG_CLIENT
)
{
if
(
This
->
Flags
&
SFLAG_CLIENT
)
{
IWineD3DSurface_LoadLocation
(
iface
,
SFLAG_INSYSMEM
,
NULL
);
IWineD3DSurface_LoadLocation
(
iface
,
SFLAG_INSYSMEM
,
NULL
);
surface_release_client_storage
(
iface
);
surface_release_client_storage
(
This
);
}
}
hr
=
IWineD3DBaseSurfaceImpl_CreateDIBSection
(
iface
);
hr
=
IWineD3DBaseSurfaceImpl_CreateDIBSection
(
iface
);
if
(
FAILED
(
hr
))
return
WINED3DERR_INVALIDCALL
;
if
(
FAILED
(
hr
))
return
WINED3DERR_INVALIDCALL
;
...
@@ -2828,9 +2827,8 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_SetMem(IWineD3DSurface *iface, void *M
...
@@ -2828,9 +2827,8 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_SetMem(IWineD3DSurface *iface, void *M
IWineD3DSurface_ModifyLocation
(
iface
,
SFLAG_INSYSMEM
,
TRUE
);
IWineD3DSurface_ModifyLocation
(
iface
,
SFLAG_INSYSMEM
,
TRUE
);
/* For client textures opengl has to be notified */
/* For client textures opengl has to be notified */
if
(
This
->
Flags
&
SFLAG_CLIENT
)
{
if
(
This
->
Flags
&
SFLAG_CLIENT
)
surface_release_client_storage
(
iface
);
surface_release_client_storage
(
This
);
}
/* Now free the old memory if any */
/* Now free the old memory if any */
HeapFree
(
GetProcessHeap
(),
0
,
release
);
HeapFree
(
GetProcessHeap
(),
0
,
release
);
...
@@ -2841,9 +2839,8 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_SetMem(IWineD3DSurface *iface, void *M
...
@@ -2841,9 +2839,8 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_SetMem(IWineD3DSurface *iface, void *M
if
(
This
->
resource
.
heapMemory
!=
NULL
)
ERR
(
"User pointer surface has heap memory allocated
\n
"
);
if
(
This
->
resource
.
heapMemory
!=
NULL
)
ERR
(
"User pointer surface has heap memory allocated
\n
"
);
This
->
Flags
&=
~
SFLAG_USERPTR
;
This
->
Flags
&=
~
SFLAG_USERPTR
;
if
(
This
->
Flags
&
SFLAG_CLIENT
)
{
if
(
This
->
Flags
&
SFLAG_CLIENT
)
surface_release_client_storage
(
iface
);
surface_release_client_storage
(
This
);
}
}
}
return
WINED3D_OK
;
return
WINED3D_OK
;
}
}
...
...
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