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
b77a6615
Commit
b77a6615
authored
Mar 13, 2011
by
Henri Verbeet
Committed by
Alexandre Julliard
Mar 14, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Get rid of IWineD3DTexture::Map().
parent
9176c9e8
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
34 deletions
+21
-34
texture.c
dlls/d3d8/texture.c
+10
-5
texture.c
dlls/d3d9/texture.c
+11
-4
texture.c
dlls/wined3d/texture.c
+0
-19
wined3d.idl
include/wine/wined3d.idl
+0
-6
No files found.
dlls/d3d8/texture.c
View file @
b77a6615
...
...
@@ -300,17 +300,22 @@ static HRESULT WINAPI IDirect3DTexture8Impl_GetSurfaceLevel(IDirect3DTexture8 *i
return
D3D_OK
;
}
static
HRESULT
WINAPI
IDirect3DTexture8Impl_LockRect
(
IDirect3DTexture8
*
iface
,
UINT
L
evel
,
D3DLOCKED_RECT
*
pLockedRect
,
const
RECT
*
pRect
,
DWORD
F
lags
)
static
HRESULT
WINAPI
IDirect3DTexture8Impl_LockRect
(
IDirect3DTexture8
*
iface
,
UINT
l
evel
,
D3DLOCKED_RECT
*
locked_rect
,
const
RECT
*
rect
,
DWORD
f
lags
)
{
IDirect3DTexture8Impl
*
This
=
impl_from_IDirect3DTexture8
(
iface
);
IDirect3DTexture8Impl
*
texture
=
impl_from_IDirect3DTexture8
(
iface
);
struct
wined3d_resource
*
sub_resource
;
HRESULT
hr
;
TRACE
(
"iface %p, level %u, locked_rect %p, rect %p, flags %#x.
\n
"
,
iface
,
Level
,
pLockedRect
,
pRect
,
F
lags
);
iface
,
level
,
locked_rect
,
rect
,
f
lags
);
wined3d_mutex_lock
();
hr
=
IWineD3DTexture_Map
(
This
->
wineD3DTexture
,
Level
,
(
WINED3DLOCKED_RECT
*
)
pLockedRect
,
pRect
,
Flags
);
if
(
!
(
sub_resource
=
IWineD3DTexture_GetSubResource
(
texture
->
wineD3DTexture
,
level
)))
hr
=
D3DERR_INVALIDCALL
;
else
hr
=
IDirect3DSurface8_LockRect
((
IDirect3DSurface8
*
)
wined3d_resource_get_parent
(
sub_resource
),
locked_rect
,
rect
,
flags
);
wined3d_mutex_unlock
();
return
hr
;
...
...
dlls/d3d9/texture.c
View file @
b77a6615
...
...
@@ -315,15 +315,22 @@ static HRESULT WINAPI IDirect3DTexture9Impl_GetSurfaceLevel(IDirect3DTexture9 *i
return
D3D_OK
;
}
static
HRESULT
WINAPI
IDirect3DTexture9Impl_LockRect
(
LPDIRECT3DTEXTURE9
iface
,
UINT
Level
,
D3DLOCKED_RECT
*
pLockedRect
,
CONST
RECT
*
pRect
,
DWORD
Flags
)
{
IDirect3DTexture9Impl
*
This
=
(
IDirect3DTexture9Impl
*
)
iface
;
static
HRESULT
WINAPI
IDirect3DTexture9Impl_LockRect
(
IDirect3DTexture9
*
iface
,
UINT
level
,
D3DLOCKED_RECT
*
locked_rect
,
const
RECT
*
rect
,
DWORD
flags
)
{
IDirect3DTexture9Impl
*
texture
=
(
IDirect3DTexture9Impl
*
)
iface
;
struct
wined3d_resource
*
sub_resource
;
HRESULT
hr
;
TRACE
(
"iface %p, level %u, locked_rect %p, rect %p, flags %#x.
\n
"
,
iface
,
Level
,
pLockedRect
,
pRect
,
F
lags
);
iface
,
level
,
locked_rect
,
rect
,
f
lags
);
wined3d_mutex_lock
();
hr
=
IWineD3DTexture_Map
(
This
->
wineD3DTexture
,
Level
,
(
WINED3DLOCKED_RECT
*
)
pLockedRect
,
pRect
,
Flags
);
if
(
!
(
sub_resource
=
IWineD3DTexture_GetSubResource
(
texture
->
wineD3DTexture
,
level
)))
hr
=
D3DERR_INVALIDCALL
;
else
hr
=
IDirect3DSurface9_LockRect
((
IDirect3DSurface9
*
)
wined3d_resource_get_parent
(
sub_resource
),
locked_rect
,
rect
,
flags
);
wined3d_mutex_unlock
();
return
hr
;
...
...
dlls/wined3d/texture.c
View file @
b77a6615
...
...
@@ -361,24 +361,6 @@ static struct wined3d_resource * WINAPI IWineD3DTextureImpl_GetSubResource(IWine
return
basetexture_get_sub_resource
(
texture
,
sub_resource_idx
);
}
static
HRESULT
WINAPI
IWineD3DTextureImpl_Map
(
IWineD3DTexture
*
iface
,
UINT
sub_resource_idx
,
WINED3DLOCKED_RECT
*
locked_rect
,
const
RECT
*
rect
,
DWORD
flags
)
{
IWineD3DBaseTextureImpl
*
texture
=
(
IWineD3DBaseTextureImpl
*
)
iface
;
struct
wined3d_resource
*
sub_resource
;
TRACE
(
"iface %p, sub_resource_idx %u, locked_rect %p, rect %s, flags %#x.
\n
"
,
iface
,
sub_resource_idx
,
locked_rect
,
wine_dbgstr_rect
(
rect
),
flags
);
if
(
!
(
sub_resource
=
basetexture_get_sub_resource
(
texture
,
sub_resource_idx
)))
{
WARN
(
"Failed to get sub-resource.
\n
"
);
return
WINED3DERR_INVALIDCALL
;
}
return
IWineD3DSurface_Map
((
IWineD3DSurface
*
)
surface_from_resource
(
sub_resource
),
locked_rect
,
rect
,
flags
);
}
static
HRESULT
WINAPI
IWineD3DTextureImpl_Unmap
(
IWineD3DTexture
*
iface
,
UINT
sub_resource_idx
)
{
IWineD3DBaseTextureImpl
*
texture
=
(
IWineD3DBaseTextureImpl
*
)
iface
;
...
...
@@ -439,7 +421,6 @@ static const IWineD3DTextureVtbl IWineD3DTexture_Vtbl =
IWineD3DTextureImpl_IsCondNP2
,
IWineD3DTextureImpl_GetSubResource
,
/* IWineD3DTexture */
IWineD3DTextureImpl_Map
,
IWineD3DTextureImpl_Unmap
,
IWineD3DTextureImpl_AddDirtyRect
};
...
...
include/wine/wined3d.idl
View file @
b77a6615
...
...
@@ -2370,12 +2370,6 @@ interface IWineD3DBaseTexture : IWineD3DResource
]
interface
IWineD3DTexture
:
IWineD3DBaseTexture
{
HRESULT
Map
(
[
in
]
UINT
sub_resource_idx
,
[
out
]
WINED3DLOCKED_RECT
*
locked_rect
,
[
in
]
const
RECT
*
rect
,
[
in
]
DWORD
flags
)
;
HRESULT
Unmap
(
[
in
]
UINT
sub_resource_idx
)
;
...
...
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