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
cc8c831c
Commit
cc8c831c
authored
Jul 19, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Add format conversion to the null driver StretchBlt implementation.
parent
eb87e694
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
bitblt.c
dlls/gdi32/bitblt.c
+11
-11
No files found.
dlls/gdi32/bitblt.c
View file @
cc8c831c
...
...
@@ -149,15 +149,9 @@ static void get_vis_rectangles( DC *dc_dst, struct bitblt_coords *dst,
}
}
static
DWORD
convert_bits
(
const
BITMAPINFO
*
src_info
,
struct
gdi_image_bits
*
src_bits
,
const
RECT
*
src_rect
,
BITMAPINFO
*
dst_info
,
struct
gdi_image_bits
*
dst_bits
)
static
void
free_heap_bits
(
struct
gdi_image_bits
*
bits
)
{
FIXME
(
"%u -> %u not implemented
\n
"
,
src_info
->
bmiHeader
.
biBitCount
,
dst_info
->
bmiHeader
.
biBitCount
);
dst_bits
->
ptr
=
src_bits
->
ptr
;
dst_bits
->
offset
=
src_bits
->
offset
;
dst_bits
->
is_copy
=
src_bits
->
is_copy
;
dst_bits
->
free
=
NULL
;
return
ERROR_SUCCESS
;
HeapFree
(
GetProcessHeap
(),
0
,
bits
->
ptr
);
}
/* nulldrv fallback implementation using StretchDIBits */
...
...
@@ -229,14 +223,20 @@ try_get_image:
if
(
err
==
ERROR_BAD_FORMAT
)
{
RECT
src_rect
=
src
->
visrect
;
offset_rect
(
&
src_rect
,
src_bits
.
offset
-
src
->
visrect
.
left
,
-
src
->
visrect
.
top
);
err
=
convert_bits
(
src_info
,
&
src_bits
,
&
src_rect
,
dst_info
,
&
dst_bits
);
if
(
!
err
)
offset_rect
(
&
src_rect
,
src_bits
.
offset
-
src
->
visrect
.
left
,
-
src
->
visrect
.
top
);
dst_info
->
bmiHeader
.
biWidth
=
src_rect
.
right
-
src_rect
.
left
;
dst_bits
.
ptr
=
HeapAlloc
(
GetProcessHeap
(),
0
,
get_dib_image_size
(
dst_info
));
if
(
dst_bits
.
ptr
)
{
dst_bits
.
is_copy
=
TRUE
;
dst_bits
.
offset
=
0
;
dst_bits
.
free
=
free_heap_bits
;
if
(
!
(
err
=
convert_bitmapinfo
(
src_info
,
src_bits
.
ptr
,
&
src_rect
,
dst_info
,
dst_bits
.
ptr
)))
err
=
dst_dev
->
funcs
->
pPutImage
(
dst_dev
,
0
,
dst_info
,
&
dst_bits
,
&
dst
->
visrect
,
rop
);
if
(
dst_bits
.
free
)
dst_bits
.
free
(
&
dst_bits
);
}
else
err
=
ERROR_OUTOFMEMORY
;
}
if
(
src_bits
.
free
)
src_bits
.
free
(
&
src_bits
);
return
!
err
;
...
...
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