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
5c5c4726
Commit
5c5c4726
authored
Jun 02, 2010
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Fix the X image masks according to the pixmap format in Get/SetDIBits.
parent
48e396ea
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
dib.c
dlls/winex11.drv/dib.c
+17
-0
No files found.
dlls/winex11.drv/dib.c
View file @
5c5c4726
...
...
@@ -71,6 +71,7 @@ typedef struct
WORD
depth
;
WORD
infoBpp
;
WORD
compression
;
ColorShifts
*
shifts
;
RGBQUAD
*
colorMap
;
int
nColorMap
;
Drawable
drawable
;
...
...
@@ -3541,6 +3542,12 @@ static int X11DRV_DIB_SetImageBits( const X11DRV_DIB_IMAGEBITS_DESCR *descr )
wine_tsx11_unlock
();
return
0
;
}
if
(
descr
->
shifts
)
{
bmpImage
->
red_mask
=
descr
->
shifts
->
physicalRed
.
max
<<
descr
->
shifts
->
physicalRed
.
shift
;
bmpImage
->
green_mask
=
descr
->
shifts
->
physicalGreen
.
max
<<
descr
->
shifts
->
physicalGreen
.
shift
;
bmpImage
->
blue_mask
=
descr
->
shifts
->
physicalBlue
.
max
<<
descr
->
shifts
->
physicalBlue
.
shift
;
}
}
wine_tsx11_unlock
();
...
...
@@ -3698,6 +3705,12 @@ static int X11DRV_DIB_GetImageBits( const X11DRV_DIB_IMAGEBITS_DESCR *descr )
wine_tsx11_unlock
();
return
0
;
}
if
(
descr
->
shifts
)
{
bmpImage
->
red_mask
=
descr
->
shifts
->
physicalRed
.
max
<<
descr
->
shifts
->
physicalRed
.
shift
;
bmpImage
->
green_mask
=
descr
->
shifts
->
physicalGreen
.
max
<<
descr
->
shifts
->
physicalGreen
.
shift
;
bmpImage
->
blue_mask
=
descr
->
shifts
->
physicalBlue
.
max
<<
descr
->
shifts
->
physicalBlue
.
shift
;
}
}
#ifdef HAVE_LIBXXSHM
...
...
@@ -3930,6 +3943,7 @@ INT CDECL X11DRV_SetDIBitsToDevice( X11DRV_PDEVICE *physDev, INT xDest, INT yDes
descr
.
lines
=
top_down
?
-
lines
:
lines
;
descr
.
infoWidth
=
width
;
descr
.
depth
=
physDev
->
depth
;
descr
.
shifts
=
physDev
->
color_shifts
;
descr
.
drawable
=
physDev
->
drawable
;
descr
.
gc
=
physDev
->
gc
;
descr
.
xSrc
=
xSrc
;
...
...
@@ -4019,6 +4033,7 @@ INT CDECL X11DRV_SetDIBits( X11DRV_PDEVICE *physDev, HBITMAP hbitmap, UINT start
descr
.
infoWidth
=
width
;
descr
.
lines
=
tmpheight
>=
0
?
lines
:
-
lines
;
descr
.
depth
=
physBitmap
->
pixmap_depth
;
descr
.
shifts
=
physBitmap
->
trueColor
?
&
physBitmap
->
pixmap_color_shifts
:
NULL
;
descr
.
drawable
=
physBitmap
->
pixmap
;
descr
.
gc
=
get_bitmap_gc
(
physBitmap
->
pixmap_depth
);
descr
.
xSrc
=
0
;
...
...
@@ -4175,6 +4190,7 @@ INT CDECL X11DRV_GetDIBits( X11DRV_PDEVICE *physDev, HBITMAP hbitmap, UINT start
descr
.
infoWidth
=
width
;
descr
.
lines
=
lines
;
descr
.
depth
=
physBitmap
->
pixmap_depth
;
descr
.
shifts
=
physBitmap
->
trueColor
?
&
physBitmap
->
pixmap_color_shifts
:
NULL
;
descr
.
drawable
=
physBitmap
->
pixmap
;
descr
.
gc
=
get_bitmap_gc
(
physBitmap
->
pixmap_depth
);
descr
.
width
=
dib
.
dsBm
.
bmWidth
;
...
...
@@ -4250,6 +4266,7 @@ static void X11DRV_DIB_DoCopyDIBSection(X_PHYSBITMAP *physBitmap, BOOL toDIB,
descr
.
nColorMap
=
nColorMap
;
descr
.
bits
=
dibSection
.
dsBm
.
bmBits
;
descr
.
depth
=
physBitmap
->
pixmap_depth
;
descr
.
shifts
=
physBitmap
->
trueColor
?
&
physBitmap
->
pixmap_color_shifts
:
NULL
;
descr
.
compression
=
dibSection
.
dsBmih
.
biCompression
;
descr
.
physBitmap
=
physBitmap
;
...
...
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