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
ebcd07a9
Commit
ebcd07a9
authored
Sep 02, 2010
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Properly support BitBlt and LAYOUT_BITMAPORIENTATIONPRESERVED in mirrored contexts.
parent
2cca18dd
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
14 deletions
+28
-14
bitblt.c
dlls/winex11.drv/bitblt.c
+27
-14
x11drv.h
dlls/winex11.drv/x11drv.h
+1
-0
No files found.
dlls/winex11.drv/bitblt.c
View file @
ebcd07a9
...
@@ -1187,8 +1187,14 @@ static BOOL BITBLT_GetVisRectangles( X11DRV_PDEVICE *physDevDst, X11DRV_PDEVICE
...
@@ -1187,8 +1187,14 @@ static BOOL BITBLT_GetVisRectangles( X11DRV_PDEVICE *physDevDst, X11DRV_PDEVICE
dst
->
y
=
rect
.
top
;
dst
->
y
=
rect
.
top
;
dst
->
width
=
rect
.
right
-
rect
.
left
;
dst
->
width
=
rect
.
right
-
rect
.
left
;
dst
->
height
=
rect
.
bottom
-
rect
.
top
;
dst
->
height
=
rect
.
bottom
-
rect
.
top
;
if
(
dst
->
width
<
0
)
SWAP_INT32
(
&
rect
.
left
,
&
rect
.
right
);
if
(
dst
->
layout
&
LAYOUT_RTL
&&
dst
->
layout
&
LAYOUT_BITMAPORIENTATIONPRESERVED
)
if
(
dst
->
height
<
0
)
SWAP_INT32
(
&
rect
.
top
,
&
rect
.
bottom
);
{
SWAP_INT32
(
&
rect
.
left
,
&
rect
.
right
);
dst
->
x
=
rect
.
left
;
dst
->
width
=
rect
.
right
-
rect
.
left
;
}
if
(
rect
.
left
>
rect
.
right
)
{
SWAP_INT32
(
&
rect
.
left
,
&
rect
.
right
);
rect
.
left
++
;
rect
.
right
++
;
}
if
(
rect
.
top
>
rect
.
bottom
)
{
SWAP_INT32
(
&
rect
.
top
,
&
rect
.
bottom
);
rect
.
top
++
;
rect
.
bottom
++
;
}
GetRgnBox
(
physDevDst
->
region
,
&
clipRect
);
GetRgnBox
(
physDevDst
->
region
,
&
clipRect
);
if
(
!
IntersectRect
(
&
dst
->
visrect
,
&
rect
,
&
clipRect
))
return
FALSE
;
if
(
!
IntersectRect
(
&
dst
->
visrect
,
&
rect
,
&
clipRect
))
return
FALSE
;
...
@@ -1206,8 +1212,14 @@ static BOOL BITBLT_GetVisRectangles( X11DRV_PDEVICE *physDevDst, X11DRV_PDEVICE
...
@@ -1206,8 +1212,14 @@ static BOOL BITBLT_GetVisRectangles( X11DRV_PDEVICE *physDevDst, X11DRV_PDEVICE
src
->
y
=
rect
.
top
;
src
->
y
=
rect
.
top
;
src
->
width
=
rect
.
right
-
rect
.
left
;
src
->
width
=
rect
.
right
-
rect
.
left
;
src
->
height
=
rect
.
bottom
-
rect
.
top
;
src
->
height
=
rect
.
bottom
-
rect
.
top
;
if
(
src
->
width
<
0
)
SWAP_INT32
(
&
rect
.
left
,
&
rect
.
right
);
if
(
src
->
layout
&
LAYOUT_RTL
&&
src
->
layout
&
LAYOUT_BITMAPORIENTATIONPRESERVED
)
if
(
src
->
height
<
0
)
SWAP_INT32
(
&
rect
.
top
,
&
rect
.
bottom
);
{
SWAP_INT32
(
&
rect
.
left
,
&
rect
.
right
);
src
->
x
=
rect
.
left
;
src
->
width
=
rect
.
right
-
rect
.
left
;
}
if
(
rect
.
left
>
rect
.
right
)
{
SWAP_INT32
(
&
rect
.
left
,
&
rect
.
right
);
rect
.
left
++
;
rect
.
right
++
;
}
if
(
rect
.
top
>
rect
.
bottom
)
{
SWAP_INT32
(
&
rect
.
top
,
&
rect
.
bottom
);
rect
.
top
++
;
rect
.
bottom
++
;
}
/* Apparently the clipping and visible regions are only for output,
/* Apparently the clipping and visible regions are only for output,
so just check against dc extent here to avoid BadMatch errors */
so just check against dc extent here to avoid BadMatch errors */
...
@@ -1407,16 +1419,6 @@ BOOL CDECL X11DRV_StretchBlt( X11DRV_PDEVICE *physDevDst, INT xDst, INT yDst, IN
...
@@ -1407,16 +1419,6 @@ BOOL CDECL X11DRV_StretchBlt( X11DRV_PDEVICE *physDevDst, INT xDst, INT yDst, IN
Pixmap
pixmaps
[
3
]
=
{
0
,
0
,
0
};
/* pixmaps for DST, SRC, TMP */
Pixmap
pixmaps
[
3
]
=
{
0
,
0
,
0
};
/* pixmaps for DST, SRC, TMP */
GC
tmpGC
=
0
;
GC
tmpGC
=
0
;
/* compensate for off-by-one shifting for negative widths and heights */
if
(
widthDst
<
0
)
++
xDst
;
if
(
heightDst
<
0
)
++
yDst
;
if
(
widthSrc
<
0
)
++
xSrc
;
if
(
heightSrc
<
0
)
++
ySrc
;
usePat
=
(((
rop
>>
4
)
&
0x0f0000
)
!=
(
rop
&
0x0f0000
));
usePat
=
(((
rop
>>
4
)
&
0x0f0000
)
!=
(
rop
&
0x0f0000
));
useSrc
=
(((
rop
>>
2
)
&
0x330000
)
!=
(
rop
&
0x330000
));
useSrc
=
(((
rop
>>
2
)
&
0x330000
)
!=
(
rop
&
0x330000
));
useDst
=
(((
rop
>>
1
)
&
0x550000
)
!=
(
rop
&
0x550000
));
useDst
=
(((
rop
>>
1
)
&
0x550000
)
!=
(
rop
&
0x550000
));
...
@@ -1426,10 +1428,19 @@ BOOL CDECL X11DRV_StretchBlt( X11DRV_PDEVICE *physDevDst, INT xDst, INT yDst, IN
...
@@ -1426,10 +1428,19 @@ BOOL CDECL X11DRV_StretchBlt( X11DRV_PDEVICE *physDevDst, INT xDst, INT yDst, IN
src
.
y
=
ySrc
;
src
.
y
=
ySrc
;
src
.
width
=
widthSrc
;
src
.
width
=
widthSrc
;
src
.
height
=
heightSrc
;
src
.
height
=
heightSrc
;
src
.
layout
=
physDevSrc
?
GetLayout
(
physDevSrc
->
hdc
)
:
0
;
dst
.
x
=
xDst
;
dst
.
x
=
xDst
;
dst
.
y
=
yDst
;
dst
.
y
=
yDst
;
dst
.
width
=
widthDst
;
dst
.
width
=
widthDst
;
dst
.
height
=
heightDst
;
dst
.
height
=
heightDst
;
dst
.
layout
=
GetLayout
(
physDevDst
->
hdc
);
if
(
rop
&
NOMIRRORBITMAP
)
{
src
.
layout
|=
LAYOUT_BITMAPORIENTATIONPRESERVED
;
dst
.
layout
|=
LAYOUT_BITMAPORIENTATIONPRESERVED
;
rop
&=
~
NOMIRRORBITMAP
;
}
if
(
useSrc
)
if
(
useSrc
)
{
{
...
@@ -1684,10 +1695,12 @@ BOOL CDECL X11DRV_AlphaBlend( X11DRV_PDEVICE *physDevDst, INT xDst, INT yDst, IN
...
@@ -1684,10 +1695,12 @@ BOOL CDECL X11DRV_AlphaBlend( X11DRV_PDEVICE *physDevDst, INT xDst, INT yDst, IN
src
.
y
=
ySrc
;
src
.
y
=
ySrc
;
src
.
width
=
widthSrc
;
src
.
width
=
widthSrc
;
src
.
height
=
heightSrc
;
src
.
height
=
heightSrc
;
src
.
layout
=
GetLayout
(
physDevSrc
->
hdc
);
dst
.
x
=
xDst
;
dst
.
x
=
xDst
;
dst
.
y
=
yDst
;
dst
.
y
=
yDst
;
dst
.
width
=
widthDst
;
dst
.
width
=
widthDst
;
dst
.
height
=
heightDst
;
dst
.
height
=
heightDst
;
dst
.
layout
=
GetLayout
(
physDevDst
->
hdc
);
if
(
!
BITBLT_GetVisRectangles
(
physDevDst
,
physDevSrc
,
&
dst
,
&
src
))
return
TRUE
;
if
(
!
BITBLT_GetVisRectangles
(
physDevDst
,
physDevSrc
,
&
dst
,
&
src
))
return
TRUE
;
...
...
dlls/winex11.drv/x11drv.h
View file @
ebcd07a9
...
@@ -174,6 +174,7 @@ struct bitblt_coords
...
@@ -174,6 +174,7 @@ struct bitblt_coords
int
width
;
int
width
;
int
height
;
int
height
;
RECT
visrect
;
/* rectangle clipped to the visible part */
RECT
visrect
;
/* rectangle clipped to the visible part */
DWORD
layout
;
/* DC layout */
};
};
...
...
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