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
0df14416
Commit
0df14416
authored
Aug 23, 2010
by
Henri Verbeet
Committed by
Alexandre Julliard
Aug 24, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Pass floating point colors to IWineD3DDeviceImpl_ColorFill().
parent
50b59552
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
11 deletions
+23
-11
device.c
dlls/d3d9/device.c
+11
-2
device.c
dlls/wined3d/device.c
+11
-8
wined3d.idl
include/wine/wined3d.idl
+1
-1
No files found.
dlls/d3d9/device.c
View file @
0df14416
...
...
@@ -1007,7 +1007,16 @@ static HRESULT WINAPI IDirect3DDevice9Impl_StretchRect(IDirect3DDevice9Ex *iface
return
hr
;
}
static
HRESULT
WINAPI
IDirect3DDevice9Impl_ColorFill
(
LPDIRECT3DDEVICE9EX
iface
,
IDirect3DSurface9
*
pSurface
,
CONST
RECT
*
pRect
,
D3DCOLOR
color
)
{
static
HRESULT
WINAPI
IDirect3DDevice9Impl_ColorFill
(
IDirect3DDevice9Ex
*
iface
,
IDirect3DSurface9
*
pSurface
,
const
RECT
*
pRect
,
D3DCOLOR
color
)
{
const
WINED3DCOLORVALUE
c
=
{
((
color
>>
16
)
&
0xff
)
/
255
.
0
f
,
((
color
>>
8
)
&
0xff
)
/
255
.
0
f
,
(
color
&
0xff
)
/
255
.
0
f
,
((
color
>>
24
)
&
0xff
)
/
255
.
0
f
,
};
IDirect3DDevice9Impl
*
This
=
(
IDirect3DDevice9Impl
*
)
iface
;
IDirect3DSurface9Impl
*
surface
=
(
IDirect3DSurface9Impl
*
)
pSurface
;
WINED3DPOOL
pool
;
...
...
@@ -1036,7 +1045,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_ColorFill(LPDIRECT3DDEVICE9EX iface
/* Colorfill can only be used on rendertarget surfaces, or offscreen plain surfaces in D3DPOOL_DEFAULT */
/* Note: D3DRECT is compatible with WINED3DRECT */
hr
=
IWineD3DDevice_ColorFill
(
This
->
WineD3DDevice
,
surface
->
wineD3DSurface
,
(
CONST
WINED3DRECT
*
)
pRect
,
color
);
hr
=
IWineD3DDevice_ColorFill
(
This
->
WineD3DDevice
,
surface
->
wineD3DSurface
,
(
const
WINED3DRECT
*
)
pRect
,
&
c
);
wined3d_mutex_unlock
();
...
...
dlls/wined3d/device.c
View file @
0df14416
...
...
@@ -1675,9 +1675,12 @@ static void IWineD3DDeviceImpl_LoadLogo(IWineD3DDeviceImpl *This, const char *fi
colorkey
.
dwColorSpaceLowValue
=
0
;
colorkey
.
dwColorSpaceHighValue
=
0
;
IWineD3DSurface_SetColorKey
(
This
->
logo_surface
,
WINEDDCKEY_SRCBLT
,
&
colorkey
);
}
else
{
}
else
{
const
WINED3DCOLORVALUE
c
=
{
1
.
0
f
,
1
.
0
f
,
1
.
0
f
,
1
.
0
f
};
/* Fill the surface with a white color to show that wined3d is there */
IWineD3DDevice_ColorFill
((
IWineD3DDevice
*
)
This
,
This
->
logo_surface
,
NULL
,
0xffffffff
);
IWineD3DDevice_ColorFill
((
IWineD3DDevice
*
)
This
,
This
->
logo_surface
,
NULL
,
&
c
);
}
out:
...
...
@@ -5494,14 +5497,14 @@ static HRESULT WINAPI IWineD3DDeviceImpl_DeletePatch(IWineD3DDevice *iface, UINT
}
static
HRESULT
WINAPI
IWineD3DDeviceImpl_ColorFill
(
IWineD3DDevice
*
iface
,
IWineD3DSurface
*
surface
,
const
WINED3DRECT
*
pRect
,
WINED3DCOLOR
color
)
IWineD3DSurface
*
surface
,
const
WINED3DRECT
*
pRect
,
const
WINED3DCOLORVALUE
*
color
)
{
const
WINED3DCOLORVALUE
c
=
{
D3DCOLOR_R
(
color
),
D3DCOLOR_G
(
color
),
D3DCOLOR_B
(
color
),
D3DCOLOR_A
(
color
)};
IWineD3DSurfaceImpl
*
s
=
(
IWineD3DSurfaceImpl
*
)
surface
;
WINEDDBLTFX
BltFx
;
TRACE
(
"iface %p, surface %p, rect %s, color 0x%08x.
\n
"
,
iface
,
surface
,
wine_dbgstr_rect
((
const
RECT
*
)
pRect
),
color
);
TRACE
(
"iface %p, surface %p, rect %s, color {%.8e, %.8e, %.8e, %.8e}.
\n
"
,
iface
,
surface
,
wine_dbgstr_rect
((
const
RECT
*
)
pRect
),
color
->
r
,
color
->
g
,
color
->
b
,
color
->
a
);
if
(
s
->
resource
.
pool
!=
WINED3DPOOL_DEFAULT
&&
s
->
resource
.
pool
!=
WINED3DPOOL_SYSTEMMEM
)
{
...
...
@@ -5514,14 +5517,14 @@ static HRESULT WINAPI IWineD3DDeviceImpl_ColorFill(IWineD3DDevice *iface,
const
RECT
draw_rect
=
{
0
,
0
,
s
->
currentDesc
.
Width
,
s
->
currentDesc
.
Height
};
return
device_clear_render_targets
((
IWineD3DDeviceImpl
*
)
iface
,
1
,
&
s
,
!!
pRect
,
(
const
RECT
*
)
pRect
,
&
draw_rect
,
WINED3DCLEAR_TARGET
,
&
c
,
0
.
0
f
,
0
);
!!
pRect
,
(
const
RECT
*
)
pRect
,
&
draw_rect
,
WINED3DCLEAR_TARGET
,
color
,
0
.
0
f
,
0
);
}
else
{
/* Just forward this to the DirectDraw blitting engine */
memset
(
&
BltFx
,
0
,
sizeof
(
BltFx
));
BltFx
.
dwSize
=
sizeof
(
BltFx
);
BltFx
.
u5
.
dwFillColor
=
wined3d_format_convert_from_float
(
s
->
resource
.
format_desc
,
&
c
);
BltFx
.
u5
.
dwFillColor
=
wined3d_format_convert_from_float
(
s
->
resource
.
format_desc
,
color
);
return
IWineD3DSurface_Blt
(
surface
,
(
const
RECT
*
)
pRect
,
NULL
,
NULL
,
WINEDDBLT_COLORFILL
,
&
BltFx
,
WINED3DTEXF_POINT
);
}
...
...
include/wine/wined3d.idl
View file @
0df14416
...
...
@@ -3376,7 +3376,7 @@ interface IWineD3DDevice : IWineD3DBase
HRESULT
ColorFill
(
[
in
]
IWineD3DSurface
*
surface
,
[
in
]
const
WINED3DRECT
*
rect
,
[
in
]
WINED3DCOLOR
color
[
in
]
const
WINED3DCOLORVALUE
*
color
)
;
HRESULT
UpdateTexture
(
[
in
]
IWineD3DBaseTexture
*
src_texture
,
...
...
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