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
3e5f87ae
Commit
3e5f87ae
authored
Sep 19, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Avoid passing color shifts to copy_image_bits.
parent
cf4cd297
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
bitblt.c
dlls/winex11.drv/bitblt.c
+9
-5
No files found.
dlls/winex11.drv/bitblt.c
View file @
3e5f87ae
...
...
@@ -1534,8 +1534,13 @@ static BOOL matching_color_info( PHYSDEV dev, const ColorShifts *color_shifts, c
return
FALSE
;
}
static
inline
BOOL
is_r8g8b8
(
int
depth
,
const
ColorShifts
*
color_shifts
)
{
return
depth
==
24
&&
color_shifts
->
logicalBlue
.
shift
==
0
&&
color_shifts
->
logicalRed
.
shift
==
16
;
}
/* copy the image bits, fixing up alignment and byte swapping as necessary */
static
DWORD
copy_image_bits
(
BITMAPINFO
*
info
,
const
ColorShifts
*
color_shifts
,
XImage
*
image
,
static
DWORD
copy_image_bits
(
BITMAPINFO
*
info
,
BOOL
is_r8g8b8
,
XImage
*
image
,
const
struct
gdi_image_bits
*
src_bits
,
struct
gdi_image_bits
*
dst_bits
,
struct
bitblt_coords
*
coords
,
const
int
*
mapping
,
unsigned
int
zeropad_mask
)
{
...
...
@@ -1563,8 +1568,7 @@ static DWORD copy_image_bits( BITMAPINFO *info, const ColorShifts *color_shifts,
need_byteswap
=
(
image
->
byte_order
!=
client_byte_order
);
break
;
case
24
:
need_byteswap
=
((
image
->
byte_order
==
LSBFirst
&&
color_shifts
->
logicalBlue
.
shift
==
16
)
||
(
image
->
byte_order
==
MSBFirst
&&
color_shifts
->
logicalBlue
.
shift
==
0
));
need_byteswap
=
(
image
->
byte_order
==
MSBFirst
)
^
!
is_r8g8b8
;
break
;
default:
need_byteswap
=
FALSE
;
...
...
@@ -1737,7 +1741,7 @@ DWORD X11DRV_PutImage( PHYSDEV dev, HBITMAP hbitmap, HRGN clip, BITMAPINFO *info
mapping
=
X11DRV_PALETTE_PaletteToXPixel
;
}
ret
=
copy_image_bits
(
info
,
color_shifts
,
image
,
bits
,
&
dst_bits
,
src
,
mapping
,
~
0u
);
ret
=
copy_image_bits
(
info
,
is_r8g8b8
(
depth
,
color_shifts
)
,
image
,
bits
,
&
dst_bits
,
src
,
mapping
,
~
0u
);
if
(
!
ret
)
{
...
...
@@ -1940,7 +1944,7 @@ DWORD X11DRV_GetImage( PHYSDEV dev, HBITMAP hbitmap, BITMAPINFO *info,
src_bits
.
ptr
=
image
->
data
;
src_bits
.
is_copy
=
TRUE
;
ret
=
copy_image_bits
(
info
,
color_shifts
,
image
,
&
src_bits
,
bits
,
src
,
mapping
,
ret
=
copy_image_bits
(
info
,
is_r8g8b8
(
depth
,
color_shifts
)
,
image
,
&
src_bits
,
bits
,
src
,
mapping
,
zeropad_masks
[(
width
*
image
->
bits_per_pixel
)
&
31
]
);
if
(
!
ret
&&
bits
->
ptr
==
image
->
data
)
...
...
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