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
3cec2ce3
Commit
3cec2ce3
authored
May 07, 2000
by
Marcus Meissner
Committed by
Alexandre Julliard
May 07, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SetImageBits_8: added ->15 conversion in optimized assembler.
parent
688c0530
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
1 deletion
+35
-1
dib.c
graphics/x11drv/dib.c
+35
-1
No files found.
graphics/x11drv/dib.c
View file @
3cec2ce3
...
...
@@ -882,7 +882,7 @@ static void X11DRV_DIB_SetImageBits_RLE4( int lines, const BYTE *bits,
*/
static
void
X11DRV_DIB_SetImageBits_8
(
int
lines
,
const
BYTE
*
srcbits
,
DWORD
srcwidth
,
DWORD
dstwidth
,
int
left
,
int
*
colors
,
XImage
*
bmpImage
)
const
int
*
colors
,
XImage
*
bmpImage
)
{
DWORD
x
;
int
h
,
color
;
...
...
@@ -902,6 +902,40 @@ static void X11DRV_DIB_SetImageBits_8( int lines, const BYTE *srcbits,
bits
=
srcbits
+
left
;
switch
(
bmpImage
->
depth
)
{
case
15
:
case
16
:
#if defined(__i386__) && defined(__GNUC__)
/* Some X servers might have 32 bit/ 16bit deep pixel */
if
(
bmpImage
->
bits_per_pixel
==
16
)
{
for
(
h
=
lines
;
h
--
;
)
{
/* Borrowed from DirectDraw */
__asm__
__volatile__
(
"xor %%eax,%%eax
\n
"
"1:
\n
"
" lodsb
\n
"
" movw (%%edx,%%eax,4),%%ax
\n
"
" stosw
\n
"
" xor %%eax,%%eax
\n
"
" loop 1b
\n
"
:
/*"=S" (bits), "=D" (dstbits)*/
:
"S"
(
bits
),
"D"
(
bmpImage
->
data
+
h
*
bmpImage
->
bytes_per_line
+
left
*
2
),
"c"
(
dstwidth
-
left
),
"d"
(
colors
)
:
"eax"
,
"cc"
,
"memory"
);
bits
=
(
srcbits
+=
linebytes
)
+
left
;
}
return
;
}
break
;
#endif
default:
break
;
/* use slow generic case below */
}
for
(
h
=
lines
-
1
;
h
>=
0
;
h
--
)
{
for
(
x
=
left
;
x
<
dstwidth
;
x
++
,
bits
++
)
{
color
=
colors
[
*
bits
];
...
...
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