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
7d42d9ea
Commit
7d42d9ea
authored
Oct 03, 2014
by
Henri Verbeet
Committed by
Alexandre Julliard
Oct 03, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Introduce a separate function for WINED3D_CT_CK_B8G8R8A8.
parent
dabe5b44
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
17 deletions
+24
-17
surface.c
dlls/wined3d/surface.c
+24
-17
No files found.
dlls/wined3d/surface.c
View file @
7d42d9ea
...
...
@@ -3282,14 +3282,33 @@ static void convert_b8g8r8x8_unorm_b8g8r8a8_unorm_color_key(const BYTE *src, uns
}
}
static
void
convert_b8g8r8a8_unorm_b8g8r8a8_unorm_color_key
(
const
BYTE
*
src
,
unsigned
int
src_pitch
,
BYTE
*
dst
,
unsigned
int
dst_pitch
,
unsigned
int
width
,
unsigned
int
height
,
const
struct
wined3d_color_key
*
color_key
)
{
const
DWORD
*
src_row
;
unsigned
int
x
,
y
;
DWORD
*
dst_row
;
for
(
y
=
0
;
y
<
height
;
++
y
)
{
src_row
=
(
DWORD
*
)
&
src
[
src_pitch
*
y
];
dst_row
=
(
DWORD
*
)
&
dst
[
dst_pitch
*
y
];
for
(
x
=
0
;
x
<
width
;
++
x
)
{
DWORD
src_color
=
src_row
[
x
];
if
(
color_in_range
(
color_key
,
src_color
))
src_color
&=
~
0xff000000
;
dst_row
[
x
]
=
src_color
;
}
}
}
static
HRESULT
d3dfmt_convert_surface
(
const
BYTE
*
src
,
BYTE
*
dst
,
UINT
pitch
,
UINT
width
,
UINT
height
,
UINT
outpitch
,
enum
wined3d_conversion_type
conversion_type
,
struct
wined3d_surface
*
surface
)
{
struct
wined3d_palette
*
palette
=
NULL
;
struct
wined3d_texture
*
texture
;
const
BYTE
*
source
;
unsigned
int
x
,
y
;
BYTE
*
dest
;
TRACE
(
"src %p, dst %p, pitch %u, width %u, height %u, outpitch %u, conversion_type %#x, surface %p.
\n
"
,
src
,
dst
,
pitch
,
width
,
height
,
outpitch
,
conversion_type
,
surface
);
...
...
@@ -3325,20 +3344,8 @@ static HRESULT d3dfmt_convert_surface(const BYTE *src, BYTE *dst, UINT pitch, UI
break
;
case
WINED3D_CT_CK_B8G8R8A8
:
for
(
y
=
0
;
y
<
height
;
++
y
)
{
source
=
src
+
pitch
*
y
;
dest
=
dst
+
outpitch
*
y
;
for
(
x
=
0
;
x
<
width
;
++
x
)
{
DWORD
color
=
*
(
const
DWORD
*
)
source
;
if
(
color_in_range
(
&
texture
->
src_blt_color_key
,
color
))
color
&=
~
0xff000000
;
*
(
DWORD
*
)
dest
=
color
;
source
+=
4
;
dest
+=
4
;
}
}
convert_b8g8r8a8_unorm_b8g8r8a8_unorm_color_key
(
src
,
pitch
,
dst
,
outpitch
,
width
,
height
,
&
texture
->
src_blt_color_key
);
break
;
default:
...
...
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