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
910fb482
Commit
910fb482
authored
Dec 08, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Use PutImage directly to set the initial bitmap bits.
parent
df9e0ccf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
4 deletions
+33
-4
bitmap.c
dlls/gdi32/bitmap.c
+33
-4
No files found.
dlls/gdi32/bitmap.c
View file @
910fb482
...
...
@@ -513,14 +513,43 @@ LONG WINAPI SetBitmapBits(
static
void
set_initial_bitmap_bits
(
HBITMAP
hbitmap
,
BITMAPOBJ
*
bmp
)
{
char
buffer
[
FIELD_OFFSET
(
BITMAPINFO
,
bmiColors
[
256
]
)];
BITMAPINFO
*
info
=
(
BITMAPINFO
*
)
buffer
;
char
src_bmibuf
[
FIELD_OFFSET
(
BITMAPINFO
,
bmiColors
[
256
]
)];
BITMAPINFO
*
src_info
=
(
BITMAPINFO
*
)
src_bmibuf
;
char
dst_bmibuf
[
FIELD_OFFSET
(
BITMAPINFO
,
bmiColors
[
256
]
)];
BITMAPINFO
*
dst_info
=
(
BITMAPINFO
*
)
dst_bmibuf
;
DWORD
err
;
struct
gdi_image_bits
bits
;
struct
bitblt_coords
src
,
dst
;
if
(
!
bmp
->
bitmap
.
bmBits
)
return
;
if
(
bmp
->
funcs
->
pPutImage
==
nulldrv_PutImage
)
return
;
get_ddb_bitmapinfo
(
bmp
,
info
);
SetDIBits
(
0
,
hbitmap
,
0
,
bmp
->
bitmap
.
bmHeight
,
bmp
->
bitmap
.
bmBits
,
info
,
DIB_RGB_COLORS
);
get_ddb_bitmapinfo
(
bmp
,
src_info
);
bits
.
ptr
=
bmp
->
bitmap
.
bmBits
;
bits
.
is_copy
=
FALSE
;
bits
.
free
=
NULL
;
bits
.
param
=
NULL
;
src
.
x
=
0
;
src
.
y
=
0
;
src
.
width
=
bmp
->
bitmap
.
bmWidth
;
src
.
height
=
bmp
->
bitmap
.
bmHeight
;
src
.
visrect
.
left
=
0
;
src
.
visrect
.
top
=
0
;
src
.
visrect
.
right
=
bmp
->
bitmap
.
bmWidth
;
src
.
visrect
.
bottom
=
bmp
->
bitmap
.
bmHeight
;
dst
=
src
;
copy_bitmapinfo
(
dst_info
,
src_info
);
err
=
bmp
->
funcs
->
pPutImage
(
NULL
,
hbitmap
,
0
,
dst_info
,
&
bits
,
&
src
,
&
dst
,
0
);
if
(
err
==
ERROR_BAD_FORMAT
)
{
err
=
convert_bits
(
src_info
,
&
src
,
dst_info
,
&
bits
,
FALSE
);
if
(
!
err
)
err
=
bmp
->
funcs
->
pPutImage
(
NULL
,
hbitmap
,
0
,
dst_info
,
&
bits
,
&
src
,
&
dst
,
0
);
if
(
bits
.
free
)
bits
.
free
(
&
bits
);
}
}
/***********************************************************************
...
...
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