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
eafebc04
Commit
eafebc04
authored
Dec 05, 2011
by
Henri Verbeet
Committed by
Alexandre Julliard
Dec 06, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Get rid of the WINED3DLOCKED_RECT typedef.
parent
6523ef5f
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
19 additions
and
19 deletions
+19
-19
surface.c
dlls/d3d8/surface.c
+1
-1
surface.c
dlls/d3d9/surface.c
+1
-1
surface.c
dlls/ddraw/surface.c
+6
-6
device.c
dlls/wined3d/device.c
+6
-6
surface.c
dlls/wined3d/surface.c
+0
-0
wined3d.h
include/wine/wined3d.h
+5
-5
No files found.
dlls/d3d8/surface.c
View file @
eafebc04
...
...
@@ -262,7 +262,7 @@ static HRESULT WINAPI IDirect3DSurface8Impl_LockRect(IDirect3DSurface8 *iface,
}
}
hr
=
wined3d_surface_map
(
This
->
wined3d_surface
,
(
WINED3DLOCKED_RECT
*
)
pLockedRect
,
pRect
,
Flags
);
hr
=
wined3d_surface_map
(
This
->
wined3d_surface
,
(
struct
wined3d_mapped_rect
*
)
pLockedRect
,
pRect
,
Flags
);
wined3d_mutex_unlock
();
return
hr
;
...
...
dlls/d3d9/surface.c
View file @
eafebc04
...
...
@@ -294,7 +294,7 @@ static HRESULT WINAPI IDirect3DSurface9Impl_LockRect(IDirect3DSurface9 *iface,
TRACE
(
"iface %p, locked_rect %p, rect %p, flags %#x.
\n
"
,
iface
,
pLockedRect
,
pRect
,
Flags
);
wined3d_mutex_lock
();
hr
=
wined3d_surface_map
(
This
->
wined3d_surface
,
(
WINED3DLOCKED_RECT
*
)
pLockedRect
,
pRect
,
Flags
);
hr
=
wined3d_surface_map
(
This
->
wined3d_surface
,
(
struct
wined3d_mapped_rect
*
)
pLockedRect
,
pRect
,
Flags
);
wined3d_mutex_unlock
();
return
hr
;
...
...
dlls/ddraw/surface.c
View file @
eafebc04
...
...
@@ -910,7 +910,7 @@ static HRESULT WINAPI ddraw_surface1_GetAttachedSurface(IDirectDrawSurface *ifac
static
HRESULT
surface_lock
(
IDirectDrawSurfaceImpl
*
This
,
RECT
*
Rect
,
DDSURFACEDESC2
*
DDSD
,
DWORD
Flags
,
HANDLE
h
)
{
WINED3DLOCKED_RECT
LockedR
ect
;
struct
wined3d_mapped_rect
mapped_r
ect
;
HRESULT
hr
=
DD_OK
;
TRACE
(
"This %p, rect %s, surface_desc %p, flags %#x, h %p.
\n
"
,
...
...
@@ -946,7 +946,7 @@ static HRESULT surface_lock(IDirectDrawSurfaceImpl *This,
if
(
This
->
surface_desc
.
ddsCaps
.
dwCaps
&
DDSCAPS_FRONTBUFFER
)
hr
=
ddraw_surface_update_frontbuffer
(
This
,
Rect
,
TRUE
);
if
(
SUCCEEDED
(
hr
))
hr
=
wined3d_surface_map
(
This
->
wined3d_surface
,
&
LockedR
ect
,
Rect
,
Flags
);
hr
=
wined3d_surface_map
(
This
->
wined3d_surface
,
&
mapped_r
ect
,
Rect
,
Flags
);
if
(
FAILED
(
hr
))
{
wined3d_mutex_unlock
();
...
...
@@ -977,7 +977,7 @@ static HRESULT surface_lock(IDirectDrawSurfaceImpl *This,
* does not set the LPSURFACE flag on locked surfaces !?!.
* DDSD->dwFlags |= DDSD_LPSURFACE;
*/
This
->
surface_desc
.
lpSurface
=
LockedRect
.
pBits
;
This
->
surface_desc
.
lpSurface
=
mapped_rect
.
data
;
DD_STRUCT_COPY_BYSIZE
(
DDSD
,
&
(
This
->
surface_desc
));
TRACE
(
"locked surface returning description :
\n
"
);
...
...
@@ -4759,7 +4759,7 @@ static HRESULT WINAPI d3d_texture2_Load(IDirect3DTexture2 *iface, IDirect3DTextu
}
else
{
WINED3DLOCKED_RECT
src_rect
,
dst_rect
;
struct
wined3d_mapped_rect
src_rect
,
dst_rect
;
/* Copy also the ColorKeying stuff */
if
(
src_desc
->
dwFlags
&
DDSD_CKSRCBLT
)
...
...
@@ -4790,9 +4790,9 @@ static HRESULT WINAPI d3d_texture2_Load(IDirect3DTexture2 *iface, IDirect3DTextu
}
if
(
dst_surface
->
surface_desc
.
u4
.
ddpfPixelFormat
.
dwFlags
&
DDPF_FOURCC
)
memcpy
(
dst_rect
.
pBits
,
src_rect
.
pBits
,
src_surface
->
surface_desc
.
u1
.
dwLinearSize
);
memcpy
(
dst_rect
.
data
,
src_rect
.
data
,
src_surface
->
surface_desc
.
u1
.
dwLinearSize
);
else
memcpy
(
dst_rect
.
pBits
,
src_rect
.
pBits
,
src_rect
.
P
itch
*
src_desc
->
dwHeight
);
memcpy
(
dst_rect
.
data
,
src_rect
.
data
,
src_rect
.
row_p
itch
*
src_desc
->
dwHeight
);
wined3d_surface_unmap
(
src_surface
->
wined3d_surface
);
wined3d_surface_unmap
(
dst_surface
->
wined3d_surface
);
...
...
dlls/wined3d/device.c
View file @
eafebc04
...
...
@@ -4967,7 +4967,7 @@ HRESULT CDECL wined3d_device_set_depth_stencil(struct wined3d_device *device, st
HRESULT
CDECL
wined3d_device_set_cursor_properties
(
struct
wined3d_device
*
device
,
UINT
x_hotspot
,
UINT
y_hotspot
,
struct
wined3d_surface
*
cursor_image
)
{
WINED3DLOCKED_RECT
lockedR
ect
;
struct
wined3d_mapped_rect
mapped_r
ect
;
TRACE
(
"device %p, x_hotspot %u, y_hotspot %u, cursor_image %p.
\n
"
,
device
,
x_hotspot
,
y_hotspot
,
cursor_image
);
...
...
@@ -4985,7 +4985,7 @@ HRESULT CDECL wined3d_device_set_cursor_properties(struct wined3d_device *device
if
(
cursor_image
)
{
WINED3DLOCKED_RECT
rect
;
struct
wined3d_mapped_rect
rect
;
/* MSDN: Cursor must be A8R8G8B8 */
if
(
cursor_image
->
resource
.
format
->
id
!=
WINED3DFMT_B8G8R8A8_UNORM
)
...
...
@@ -5018,7 +5018,7 @@ HRESULT CDECL wined3d_device_set_cursor_properties(struct wined3d_device *device
const
struct
wined3d_gl_info
*
gl_info
=
&
device
->
adapter
->
gl_info
;
const
struct
wined3d_format
*
format
=
wined3d_get_format
(
gl_info
,
WINED3DFMT_B8G8R8A8_UNORM
);
struct
wined3d_context
*
context
;
char
*
mem
,
*
bits
=
rect
.
pBits
;
char
*
mem
,
*
bits
=
rect
.
data
;
GLint
intfmt
=
format
->
glInternal
;
GLint
gl_format
=
format
->
glFormat
;
GLint
type
=
format
->
glType
;
...
...
@@ -5031,7 +5031,7 @@ HRESULT CDECL wined3d_device_set_cursor_properties(struct wined3d_device *device
* different) */
mem
=
HeapAlloc
(
GetProcessHeap
(),
0
,
width
*
height
*
bpp
);
for
(
i
=
0
;
i
<
height
;
i
++
)
memcpy
(
&
mem
[
width
*
bpp
*
i
],
&
bits
[
rect
.
P
itch
*
i
],
width
*
bpp
);
memcpy
(
&
mem
[
width
*
bpp
*
i
],
&
bits
[
rect
.
row_p
itch
*
i
],
width
*
bpp
);
wined3d_surface_unmap
(
cursor_image
);
context
=
context_acquire
(
device
,
NULL
);
...
...
@@ -5080,7 +5080,7 @@ HRESULT CDECL wined3d_device_set_cursor_properties(struct wined3d_device *device
* chunks. */
DWORD
*
maskBits
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
(
cursor_image
->
resource
.
width
*
cursor_image
->
resource
.
height
/
8
));
wined3d_surface_map
(
cursor_image
,
&
lockedR
ect
,
NULL
,
wined3d_surface_map
(
cursor_image
,
&
mapped_r
ect
,
NULL
,
WINED3DLOCK_NO_DIRTY_UPDATE
|
WINED3DLOCK_READONLY
);
TRACE
(
"width: %u height: %u.
\n
"
,
cursor_image
->
resource
.
width
,
cursor_image
->
resource
.
height
);
...
...
@@ -5090,7 +5090,7 @@ HRESULT CDECL wined3d_device_set_cursor_properties(struct wined3d_device *device
cursorInfo
.
hbmMask
=
CreateBitmap
(
cursor_image
->
resource
.
width
,
cursor_image
->
resource
.
height
,
1
,
1
,
maskBits
);
cursorInfo
.
hbmColor
=
CreateBitmap
(
cursor_image
->
resource
.
width
,
cursor_image
->
resource
.
height
,
1
,
32
,
lockedRect
.
pBits
);
1
,
32
,
mapped_rect
.
data
);
wined3d_surface_unmap
(
cursor_image
);
/* Create our cursor and clean up. */
cursor
=
CreateIconIndirect
(
&
cursorInfo
);
...
...
dlls/wined3d/surface.c
View file @
eafebc04
This diff is collapsed.
Click to expand it.
include/wine/wined3d.h
View file @
eafebc04
...
...
@@ -1702,11 +1702,11 @@ struct wined3d_raster_status
UINT
scan_line
;
};
typedef
struct
_WINED3DLOCKED_RECT
struct
wined3d_mapped_rect
{
INT
P
itch
;
void
*
pBits
;
}
WINED3DLOCKED_RECT
;
UINT
row_p
itch
;
void
*
data
;
};
typedef
struct
_WINED3DLOCKED_BOX
{
...
...
@@ -2360,7 +2360,7 @@ HRESULT __cdecl wined3d_surface_getdc(struct wined3d_surface *surface, HDC *dc);
ULONG
__cdecl
wined3d_surface_incref
(
struct
wined3d_surface
*
surface
);
HRESULT
__cdecl
wined3d_surface_is_lost
(
const
struct
wined3d_surface
*
surface
);
HRESULT
__cdecl
wined3d_surface_map
(
struct
wined3d_surface
*
surface
,
WINED3DLOCKED_RECT
*
lock
ed_rect
,
const
RECT
*
rect
,
DWORD
flags
);
struct
wined3d_mapped_rect
*
mapp
ed_rect
,
const
RECT
*
rect
,
DWORD
flags
);
void
__cdecl
wined3d_surface_preload
(
struct
wined3d_surface
*
surface
);
HRESULT
__cdecl
wined3d_surface_releasedc
(
struct
wined3d_surface
*
surface
,
HDC
dc
);
HRESULT
__cdecl
wined3d_surface_restore
(
struct
wined3d_surface
*
surface
);
...
...
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