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
eeb3625d
Commit
eeb3625d
authored
Jul 14, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Add support for bottom-up format in PutImage.
parent
611b168b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
bitblt.c
dlls/winex11.drv/bitblt.c
+10
-5
No files found.
dlls/winex11.drv/bitblt.c
View file @
eeb3625d
...
@@ -1641,8 +1641,8 @@ static DWORD copy_image_bits( BITMAPINFO *info, const ColorShifts *color_shifts,
...
@@ -1641,8 +1641,8 @@ static DWORD copy_image_bits( BITMAPINFO *info, const ColorShifts *color_shifts,
const
struct
gdi_image_bits
*
src_bits
,
struct
gdi_image_bits
*
dst_bits
)
const
struct
gdi_image_bits
*
src_bits
,
struct
gdi_image_bits
*
dst_bits
)
{
{
BOOL
need_byteswap
;
BOOL
need_byteswap
;
int
x
,
y
,
height
=
-
info
->
bmiHeader
.
biHeight
;
int
x
,
y
,
height
=
abs
(
info
->
bmiHeader
.
biHeight
)
;
unsigned
int
width_bytes
=
image
->
bytes_per_line
;
int
width_bytes
=
image
->
bytes_per_line
;
unsigned
char
*
src
,
*
dst
;
unsigned
char
*
src
,
*
dst
;
switch
(
info
->
bmiHeader
.
biBitCount
)
switch
(
info
->
bmiHeader
.
biBitCount
)
...
@@ -1666,7 +1666,7 @@ static DWORD copy_image_bits( BITMAPINFO *info, const ColorShifts *color_shifts,
...
@@ -1666,7 +1666,7 @@ static DWORD copy_image_bits( BITMAPINFO *info, const ColorShifts *color_shifts,
break
;
break
;
}
}
if
((
need_byteswap
&&
!
src_bits
->
is_copy
)
||
(
width_bytes
&
3
))
if
((
need_byteswap
&&
!
src_bits
->
is_copy
)
||
(
width_bytes
&
3
)
||
(
info
->
bmiHeader
.
biHeight
>
0
)
)
{
{
width_bytes
=
(
width_bytes
+
3
)
&
~
3
;
width_bytes
=
(
width_bytes
+
3
)
&
~
3
;
info
->
bmiHeader
.
biSizeImage
=
height
*
width_bytes
;
info
->
bmiHeader
.
biSizeImage
=
height
*
width_bytes
;
...
@@ -1689,6 +1689,12 @@ static DWORD copy_image_bits( BITMAPINFO *info, const ColorShifts *color_shifts,
...
@@ -1689,6 +1689,12 @@ static DWORD copy_image_bits( BITMAPINFO *info, const ColorShifts *color_shifts,
src
=
src_bits
->
ptr
;
src
=
src_bits
->
ptr
;
dst
=
dst_bits
->
ptr
;
dst
=
dst_bits
->
ptr
;
if
(
info
->
bmiHeader
.
biHeight
>
0
)
{
dst
+=
(
height
-
1
)
*
width_bytes
;
width_bytes
=
-
width_bytes
;
}
if
(
need_byteswap
)
if
(
need_byteswap
)
{
{
switch
(
info
->
bmiHeader
.
biBitCount
)
switch
(
info
->
bmiHeader
.
biBitCount
)
...
@@ -1768,7 +1774,6 @@ DWORD X11DRV_PutImage( PHYSDEV dev, HBITMAP hbitmap, BITMAPINFO *info, const str
...
@@ -1768,7 +1774,6 @@ DWORD X11DRV_PutImage( PHYSDEV dev, HBITMAP hbitmap, BITMAPINFO *info, const str
if
(
info
->
bmiHeader
.
biPlanes
!=
1
)
goto
update_format
;
if
(
info
->
bmiHeader
.
biPlanes
!=
1
)
goto
update_format
;
if
(
info
->
bmiHeader
.
biBitCount
!=
format
->
bits_per_pixel
)
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 */
/* FIXME: could try to handle 1-bpp using XCopyPlane */
if
(
info
->
bmiHeader
.
biCompression
==
BI_BITFIELDS
)
if
(
info
->
bmiHeader
.
biCompression
==
BI_BITFIELDS
)
...
@@ -1804,7 +1809,7 @@ DWORD X11DRV_PutImage( PHYSDEV dev, HBITMAP hbitmap, BITMAPINFO *info, const str
...
@@ -1804,7 +1809,7 @@ DWORD X11DRV_PutImage( PHYSDEV dev, HBITMAP hbitmap, BITMAPINFO *info, const str
wine_tsx11_lock
();
wine_tsx11_lock
();
image
=
XCreateImage
(
gdi_display
,
visual
,
depth
,
ZPixmap
,
0
,
NULL
,
image
=
XCreateImage
(
gdi_display
,
visual
,
depth
,
ZPixmap
,
0
,
NULL
,
info
->
bmiHeader
.
biWidth
,
-
info
->
bmiHeader
.
biHeight
,
32
,
0
);
info
->
bmiHeader
.
biWidth
,
abs
(
info
->
bmiHeader
.
biHeight
)
,
32
,
0
);
wine_tsx11_unlock
();
wine_tsx11_unlock
();
if
(
!
image
)
return
ERROR_OUTOFMEMORY
;
if
(
!
image
)
return
ERROR_OUTOFMEMORY
;
...
...
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