Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
165b21dd
Commit
165b21dd
authored
Sep 09, 2008
by
Huw Davies
Committed by
Alexandre Julliard
Sep 10, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11.drv: Fix SetDIBits optimization to work with top-down dib sections.
parent
38901f08
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
dib.c
dlls/winex11.drv/dib.c
+6
-6
No files found.
dlls/winex11.drv/dib.c
View file @
165b21dd
...
@@ -3922,7 +3922,7 @@ INT X11DRV_SetDIBits( X11DRV_PDEVICE *physDev, HBITMAP hbitmap, UINT startscan,
...
@@ -3922,7 +3922,7 @@ INT X11DRV_SetDIBits( X11DRV_PDEVICE *physDev, HBITMAP hbitmap, UINT startscan,
{
{
X_PHYSBITMAP
*
physBitmap
=
X11DRV_get_phys_bitmap
(
hbitmap
);
X_PHYSBITMAP
*
physBitmap
=
X11DRV_get_phys_bitmap
(
hbitmap
);
X11DRV_DIB_IMAGEBITS_DESCR
descr
;
X11DRV_DIB_IMAGEBITS_DESCR
descr
;
BITMAP
bitmap
;
DIBSECTION
ds
;
LONG
width
,
height
,
tmpheight
;
LONG
width
,
height
,
tmpheight
;
INT
result
;
INT
result
;
...
@@ -3939,7 +3939,7 @@ INT X11DRV_SetDIBits( X11DRV_PDEVICE *physDev, HBITMAP hbitmap, UINT startscan,
...
@@ -3939,7 +3939,7 @@ INT X11DRV_SetDIBits( X11DRV_PDEVICE *physDev, HBITMAP hbitmap, UINT startscan,
if
(
!
lines
||
(
startscan
>=
height
))
if
(
!
lines
||
(
startscan
>=
height
))
return
0
;
return
0
;
if
(
!
GetObjectW
(
hbitmap
,
sizeof
(
bitmap
),
&
bitmap
))
return
0
;
if
(
!
GetObjectW
(
hbitmap
,
sizeof
(
ds
),
&
ds
))
return
0
;
if
(
startscan
+
lines
>
height
)
lines
=
height
-
startscan
;
if
(
startscan
+
lines
>
height
)
lines
=
height
-
startscan
;
...
@@ -3986,7 +3986,7 @@ INT X11DRV_SetDIBits( X11DRV_PDEVICE *physDev, HBITMAP hbitmap, UINT startscan,
...
@@ -3986,7 +3986,7 @@ INT X11DRV_SetDIBits( X11DRV_PDEVICE *physDev, HBITMAP hbitmap, UINT startscan,
descr
.
ySrc
=
0
;
descr
.
ySrc
=
0
;
descr
.
xDest
=
0
;
descr
.
xDest
=
0
;
descr
.
yDest
=
height
-
startscan
-
lines
;
descr
.
yDest
=
height
-
startscan
-
lines
;
descr
.
width
=
bitmap
.
bmWidth
;
descr
.
width
=
ds
.
dsBm
.
bmWidth
;
descr
.
height
=
lines
;
descr
.
height
=
lines
;
descr
.
useShm
=
FALSE
;
descr
.
useShm
=
FALSE
;
descr
.
dibpitch
=
((
descr
.
infoWidth
*
descr
.
infoBpp
+
31
)
&~
31
)
/
8
;
descr
.
dibpitch
=
((
descr
.
infoWidth
*
descr
.
infoBpp
+
31
)
&~
31
)
/
8
;
...
@@ -3998,17 +3998,17 @@ INT X11DRV_SetDIBits( X11DRV_PDEVICE *physDev, HBITMAP hbitmap, UINT startscan,
...
@@ -3998,17 +3998,17 @@ INT X11DRV_SetDIBits( X11DRV_PDEVICE *physDev, HBITMAP hbitmap, UINT startscan,
* cheap - saves a round trip to the X server */
* cheap - saves a round trip to the X server */
if
(
descr
.
compression
==
BI_RGB
&&
if
(
descr
.
compression
==
BI_RGB
&&
coloruse
==
DIB_RGB_COLORS
&&
coloruse
==
DIB_RGB_COLORS
&&
descr
.
infoBpp
==
bitmap
.
bmBitsPixel
&&
descr
.
infoBpp
==
ds
.
dsBm
.
bmBitsPixel
&&
physBitmap
->
base
&&
physBitmap
->
size
<
65536
)
physBitmap
->
base
&&
physBitmap
->
size
<
65536
)
{
{
unsigned
int
srcwidthb
=
bitmap
.
bmWidthBytes
;
unsigned
int
srcwidthb
=
ds
.
dsBm
.
bmWidthBytes
;
int
dstwidthb
=
X11DRV_DIB_GetDIBWidthBytes
(
width
,
descr
.
infoBpp
);
int
dstwidthb
=
X11DRV_DIB_GetDIBWidthBytes
(
width
,
descr
.
infoBpp
);
LPBYTE
dbits
=
physBitmap
->
base
,
sbits
=
(
LPBYTE
)
bits
+
(
startscan
*
srcwidthb
);
LPBYTE
dbits
=
physBitmap
->
base
,
sbits
=
(
LPBYTE
)
bits
+
(
startscan
*
srcwidthb
);
int
widthb
;
int
widthb
;
UINT
y
;
UINT
y
;
TRACE
(
"syncing compatible set bits to app bits
\n
"
);
TRACE
(
"syncing compatible set bits to app bits
\n
"
);
if
((
tmpheight
<
0
)
^
(
bitmap
.
bm
Height
<
0
))
if
((
tmpheight
<
0
)
^
(
ds
.
dsBmih
.
bi
Height
<
0
))
{
{
dbits
+=
dstwidthb
*
(
lines
-
1
);
dbits
+=
dstwidthb
*
(
lines
-
1
);
dstwidthb
=
-
dstwidthb
;
dstwidthb
=
-
dstwidthb
;
...
...
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