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
611b168b
Commit
611b168b
authored
Jul 14, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Add support for rops in PutImage.
parent
c02bbb78
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
7 deletions
+38
-7
bitblt.c
dlls/winex11.drv/bitblt.c
+38
-7
No files found.
dlls/winex11.drv/bitblt.c
View file @
611b168b
...
...
@@ -1747,6 +1747,8 @@ DWORD X11DRV_PutImage( PHYSDEV dev, HBITMAP hbitmap, BITMAPINFO *info, const str
struct
gdi_image_bits
dst_bits
;
const
XPixmapFormatValues
*
format
;
const
ColorShifts
*
color_shifts
;
int
width
=
rect
->
right
-
rect
->
left
;
int
height
=
rect
->
bottom
-
rect
->
top
;
if
(
hbitmap
)
{
...
...
@@ -1767,6 +1769,7 @@ DWORD X11DRV_PutImage( PHYSDEV dev, HBITMAP hbitmap, BITMAPINFO *info, const str
if
(
info
->
bmiHeader
.
biPlanes
!=
1
)
goto
update_format
;
if
(
info
->
bmiHeader
.
biBitCount
!=
format
->
bits_per_pixel
)
goto
update_format
;
if
(
info
->
bmiHeader
.
biHeight
>
0
)
goto
update_format
;
/* bottom-up not supported */
/* FIXME: could try to handle 1-bpp using XCopyPlane */
if
(
info
->
bmiHeader
.
biCompression
==
BI_BITFIELDS
)
{
...
...
@@ -1814,18 +1817,46 @@ DWORD X11DRV_PutImage( PHYSDEV dev, HBITMAP hbitmap, BITMAPINFO *info, const str
{
wine_tsx11_lock
();
XPutImage
(
gdi_display
,
bitmap
->
pixmap
,
get_bitmap_gc
(
depth
),
image
,
dst_bits
.
offset
,
0
,
rect
->
left
,
rect
->
top
,
rect
->
right
-
rect
->
left
,
rect
->
bottom
-
rect
->
top
);
rect
->
left
,
rect
->
top
,
width
,
height
);
wine_tsx11_unlock
();
}
else
{
/* FIXME: copy rop handling from BitBlt here */
const
BYTE
*
opcode
=
BITBLT_Opcodes
[(
rop
>>
16
)
&
0xff
];
X11DRV_LockDIBSection
(
physdev
,
DIB_Status_GdiMod
);
wine_tsx11_lock
();
XPutImage
(
gdi_display
,
physdev
->
drawable
,
physdev
->
gc
,
image
,
dst_bits
.
offset
,
0
,
physdev
->
dc_rect
.
left
+
rect
->
left
,
physdev
->
dc_rect
.
top
+
rect
->
top
,
rect
->
right
-
rect
->
left
,
rect
->
bottom
-
rect
->
top
);
wine_tsx11_unlock
();
/* optimization for single-op ROPs */
if
(
!
opcode
[
1
]
&&
OP_SRCDST
(
opcode
[
0
])
==
OP_ARGS
(
SRC
,
DST
))
{
wine_tsx11_lock
();
XSetFunction
(
gdi_display
,
physdev
->
gc
,
OP_ROP
(
*
opcode
)
);
XPutImage
(
gdi_display
,
physdev
->
drawable
,
physdev
->
gc
,
image
,
dst_bits
.
offset
,
0
,
physdev
->
dc_rect
.
left
+
rect
->
left
,
physdev
->
dc_rect
.
top
+
rect
->
top
,
width
,
height
);
wine_tsx11_unlock
();
}
else
{
Pixmap
src_pixmap
;
GC
gc
;
wine_tsx11_lock
();
gc
=
XCreateGC
(
gdi_display
,
physdev
->
drawable
,
0
,
NULL
);
XSetSubwindowMode
(
gdi_display
,
gc
,
IncludeInferiors
);
XSetGraphicsExposures
(
gdi_display
,
gc
,
False
);
src_pixmap
=
XCreatePixmap
(
gdi_display
,
root_window
,
width
,
height
,
depth
);
XPutImage
(
gdi_display
,
src_pixmap
,
gc
,
image
,
dst_bits
.
offset
,
0
,
0
,
0
,
width
,
height
);
wine_tsx11_unlock
();
execute_rop
(
physdev
,
src_pixmap
,
gc
,
rect
,
rop
);
wine_tsx11_lock
();
XFreePixmap
(
gdi_display
,
src_pixmap
);
XFreeGC
(
gdi_display
,
gc
);
wine_tsx11_unlock
();
}
X11DRV_UnlockDIBSection
(
physdev
,
!
ret
);
}
image
->
data
=
NULL
;
...
...
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