Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lorenzo Ferrillo
wine
Commits
910fb482
Commit
910fb482
authored
13 years ago
by
Alexandre Julliard
Browse files
Options
Downloads
Patches
Plain Diff
gdi32: Use PutImage directly to set the initial bitmap bits.
parent
df9e0ccf
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/gdi32/bitmap.c
+33
-4
33 additions, 4 deletions
dlls/gdi32/bitmap.c
with
33 additions
and
4 deletions
dlls/gdi32/bitmap.c
+
33
−
4
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
);
}
}
/***********************************************************************
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment