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
c6fa30a2
Commit
c6fa30a2
authored
Nov 10, 2006
by
Damjan Jovanovic
Committed by
Alexandre Julliard
Nov 10, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11.drv: Fix copying top-down/bottom-up DIBs.
parent
48f934ee
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
9 deletions
+25
-9
bitblt.c
dlls/winex11.drv/bitblt.c
+25
-9
No files found.
dlls/winex11.drv/bitblt.c
View file @
c6fa30a2
...
...
@@ -1535,6 +1535,7 @@ static BOOL X11DRV_ClientSideDIBCopy( X11DRV_PDEVICE *physDevSrc, INT xSrc, INT
{
DIBSECTION
srcDib
,
dstDib
;
BYTE
*
srcPtr
,
*
dstPtr
;
INT
srcRowOffset
,
dstRowOffset
;
INT
bytesPerPixel
;
INT
bytesToCopy
;
INT
y
;
...
...
@@ -1574,11 +1575,6 @@ static BOOL X11DRV_ClientSideDIBCopy( X11DRV_PDEVICE *physDevSrc, INT xSrc, INT
FIXME
(
"potential optimization: client-side compressed DIB copy
\n
"
);
return
FALSE
;
}
if
(
srcDib
.
dsBmih
.
biHeight
<
0
||
dstDib
.
dsBmih
.
biHeight
<
0
)
{
FIXME
(
"potential optimization: client-side bottom-up DIB copy
\n
"
);
return
FALSE
;
}
switch
(
dstDib
.
dsBm
.
bmBitsPixel
)
{
...
...
@@ -1599,14 +1595,34 @@ static BOOL X11DRV_ClientSideDIBCopy( X11DRV_PDEVICE *physDevSrc, INT xSrc, INT
bytesToCopy
=
width
*
bytesPerPixel
;
srcPtr
=
&
physDevSrc
->
bitmap
->
base
[
ySrc
*
srcDib
.
dsBm
.
bmWidthBytes
+
xSrc
*
bytesPerPixel
];
dstPtr
=
&
physDevDst
->
bitmap
->
base
[
yDst
*
dstDib
.
dsBm
.
bmWidthBytes
+
xDst
*
bytesPerPixel
];
if
(
srcDib
.
dsBmih
.
biHeight
<
0
)
{
srcPtr
=
&
physDevSrc
->
bitmap
->
base
[
ySrc
*
srcDib
.
dsBm
.
bmWidthBytes
+
xSrc
*
bytesPerPixel
];
srcRowOffset
=
srcDib
.
dsBm
.
bmWidthBytes
;
}
else
{
srcPtr
=
&
physDevSrc
->
bitmap
->
base
[(
srcDib
.
dsBm
.
bmWidth
-
ySrc
-
1
)
*
srcDib
.
dsBm
.
bmWidthBytes
+
xSrc
*
bytesPerPixel
];
srcRowOffset
=
-
srcDib
.
dsBm
.
bmWidthBytes
;
}
if
(
dstDib
.
dsBmih
.
biHeight
<
0
)
{
dstPtr
=
&
physDevDst
->
bitmap
->
base
[
yDst
*
dstDib
.
dsBm
.
bmWidthBytes
+
xDst
*
bytesPerPixel
];
dstRowOffset
=
dstDib
.
dsBm
.
bmWidthBytes
;
}
else
{
dstPtr
=
&
physDevDst
->
bitmap
->
base
[(
dstDib
.
dsBm
.
bmWidth
-
yDst
-
1
)
*
dstDib
.
dsBm
.
bmWidthBytes
+
xDst
*
bytesPerPixel
];
dstRowOffset
=
-
dstDib
.
dsBm
.
bmWidthBytes
;
}
for
(
y
=
yDst
;
y
<
yDst
+
height
;
++
y
)
{
memcpy
(
dstPtr
,
srcPtr
,
bytesToCopy
);
srcPtr
+=
src
Dib
.
dsBm
.
bmWidthBytes
;
dstPtr
+=
dst
Dib
.
dsBm
.
bmWidthBytes
;
srcPtr
+=
src
RowOffset
;
dstPtr
+=
dst
RowOffset
;
}
return
TRUE
;
...
...
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