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
df9e0ccf
Commit
df9e0ccf
authored
Dec 08, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Use the convert_bits helper function in SetDIBits and SetDIBitsToDevice.
parent
dd7c38d0
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
28 deletions
+3
-28
dib.c
dlls/gdi32/dib.c
+3
-28
No files found.
dlls/gdi32/dib.c
View file @
df9e0ccf
...
...
@@ -680,21 +680,8 @@ INT WINAPI SetDIBits( HDC hdc, HBITMAP hbitmap, UINT startscan,
err
=
funcs
->
pPutImage
(
NULL
,
hbitmap
,
clip
,
dst_info
,
&
src_bits
,
&
src
,
&
dst
,
0
);
if
(
err
==
ERROR_BAD_FORMAT
)
{
void
*
ptr
;
dst_info
->
bmiHeader
.
biWidth
=
dst
.
width
;
ptr
=
HeapAlloc
(
GetProcessHeap
(),
0
,
get_dib_image_size
(
dst_info
));
if
(
ptr
)
{
err
=
convert_bitmapinfo
(
src_info
,
src_bits
.
ptr
,
&
src
,
dst_info
,
ptr
,
FALSE
);
if
(
src_bits
.
free
)
src_bits
.
free
(
&
src_bits
);
src_bits
.
ptr
=
ptr
;
src_bits
.
is_copy
=
TRUE
;
src_bits
.
free
=
free_heap_bits
;
if
(
!
err
)
err
=
funcs
->
pPutImage
(
NULL
,
hbitmap
,
clip
,
dst_info
,
&
src_bits
,
&
src
,
&
dst
,
0
);
}
else
err
=
ERROR_OUTOFMEMORY
;
err
=
convert_bits
(
src_info
,
&
src
,
dst_info
,
&
src_bits
,
FALSE
);
if
(
!
err
)
err
=
funcs
->
pPutImage
(
NULL
,
hbitmap
,
clip
,
dst_info
,
&
src_bits
,
&
src
,
&
dst
,
0
);
}
if
(
err
)
result
=
0
;
...
...
@@ -810,21 +797,9 @@ INT nulldrv_SetDIBitsToDevice( PHYSDEV dev, INT x_dst, INT y_dst, DWORD cx, DWOR
err
=
dev
->
funcs
->
pPutImage
(
dev
,
0
,
clip
,
dst_info
,
&
src_bits
,
&
src
,
&
dst
,
SRCCOPY
);
if
(
err
==
ERROR_BAD_FORMAT
)
{
void
*
ptr
;
dst_info
->
bmiHeader
.
biWidth
=
src
.
visrect
.
right
-
src
.
visrect
.
left
;
ptr
=
HeapAlloc
(
GetProcessHeap
(),
0
,
get_dib_image_size
(
dst_info
));
if
(
ptr
)
{
err
=
convert_bitmapinfo
(
src_info
,
src_bits
.
ptr
,
&
src
,
dst_info
,
ptr
,
FALSE
);
if
(
src_bits
.
free
)
src_bits
.
free
(
&
src_bits
);
src_bits
.
ptr
=
ptr
;
src_bits
.
is_copy
=
TRUE
;
src_bits
.
free
=
free_heap_bits
;
err
=
convert_bits
(
src_info
,
&
src
,
dst_info
,
&
src_bits
,
FALSE
);
if
(
!
err
)
err
=
dev
->
funcs
->
pPutImage
(
dev
,
0
,
clip
,
dst_info
,
&
src_bits
,
&
src
,
&
dst
,
SRCCOPY
);
}
else
err
=
ERROR_OUTOFMEMORY
;
}
if
(
err
)
lines
=
0
;
done:
...
...
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