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
7089128d
Commit
7089128d
authored
Jul 08, 2009
by
Henri Verbeet
Committed by
Alexandre Julliard
Jul 08, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Implement a A8R8G8B8 to X8R8G8B8 surface format converter.
parent
8b930768
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
+20
-0
surface_base.c
dlls/wined3d/surface_base.c
+20
-0
No files found.
dlls/wined3d/surface_base.c
View file @
7089128d
...
...
@@ -724,6 +724,25 @@ static void convert_r5g6b5_x8r8g8b8(const BYTE *src, BYTE *dst,
}
}
static
void
convert_a8r8g8b8_x8r8g8b8
(
const
BYTE
*
src
,
BYTE
*
dst
,
DWORD
pitch_in
,
DWORD
pitch_out
,
unsigned
int
w
,
unsigned
int
h
)
{
unsigned
int
x
,
y
;
TRACE
(
"Converting %ux%u pixels, pitches %u %u
\n
"
,
w
,
h
,
pitch_in
,
pitch_out
);
for
(
y
=
0
;
y
<
h
;
++
y
)
{
const
DWORD
*
src_line
=
(
const
DWORD
*
)(
src
+
y
*
pitch_in
);
DWORD
*
dst_line
=
(
DWORD
*
)(
dst
+
y
*
pitch_out
);
for
(
x
=
0
;
x
<
w
;
++
x
)
{
dst_line
[
x
]
=
0xff000000
|
(
src_line
[
x
]
&
0xffffff
);
}
}
}
struct
d3dfmt_convertor_desc
{
WINED3DFORMAT
from
,
to
;
void
(
*
convert
)(
const
BYTE
*
src
,
BYTE
*
dst
,
DWORD
pitch_in
,
DWORD
pitch_out
,
unsigned
int
w
,
unsigned
int
h
);
...
...
@@ -733,6 +752,7 @@ static const struct d3dfmt_convertor_desc convertors[] =
{
{
WINED3DFMT_R32_FLOAT
,
WINED3DFMT_R16_FLOAT
,
convert_r32_float_r16_float
},
{
WINED3DFMT_R5G6B5
,
WINED3DFMT_X8R8G8B8
,
convert_r5g6b5_x8r8g8b8
},
{
WINED3DFMT_A8R8G8B8
,
WINED3DFMT_X8R8G8B8
,
convert_a8r8g8b8_x8r8g8b8
},
};
static
inline
const
struct
d3dfmt_convertor_desc
*
find_convertor
(
WINED3DFORMAT
from
,
WINED3DFORMAT
to
)
...
...
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