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
2127e944
Commit
2127e944
authored
Oct 17, 2011
by
Huw Davies
Committed by
Alexandre Julliard
Oct 17, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Allow a caller to build_rle_bitmap to not request the clip region.
parent
8f4fab24
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
8 deletions
+13
-8
dib.c
dlls/gdi32/dib.c
+13
-8
No files found.
dlls/gdi32/dib.c
View file @
2127e944
...
...
@@ -252,14 +252,19 @@ static BOOL build_rle_bitmap( const BITMAPINFO *info, struct gdi_image_bits *bit
BYTE
skip
,
num
,
data
;
BYTE
*
out_bits
,
*
in_bits
=
bits
->
ptr
;
*
clip
=
NULL
;
if
(
clip
)
*
clip
=
NULL
;
assert
(
info
->
bmiHeader
.
biBitCount
==
4
||
info
->
bmiHeader
.
biBitCount
==
8
);
out_bits
=
HeapAlloc
(
GetProcessHeap
(),
0
,
get_dib_image_size
(
info
)
);
*
clip
=
CreateRectRgn
(
0
,
0
,
0
,
0
);
run
=
CreateRectRgn
(
0
,
0
,
0
,
0
);
if
(
!
out_bits
||
!*
clip
||
!
run
)
goto
fail
;
out_bits
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
get_dib_image_size
(
info
)
);
if
(
!
out_bits
)
goto
fail
;
if
(
clip
)
{
*
clip
=
CreateRectRgn
(
0
,
0
,
0
,
0
);
run
=
CreateRectRgn
(
0
,
0
,
0
,
0
);
if
(
!*
clip
||
!
run
)
goto
fail
;
}
x
=
left
=
right
=
0
;
y
=
height
-
1
;
...
...
@@ -299,7 +304,7 @@ static BOOL build_rle_bitmap( const BITMAPINFO *info, struct gdi_image_bits *bit
{
if
(
data
<
3
)
{
if
(
left
!=
right
)
if
(
left
!=
right
&&
clip
)
{
SetRectRgn
(
run
,
left
,
y
,
right
,
y
+
1
);
CombineRgn
(
*
clip
,
run
,
*
clip
,
RGN_OR
);
...
...
@@ -365,7 +370,7 @@ static BOOL build_rle_bitmap( const BITMAPINFO *info, struct gdi_image_bits *bit
}
done:
DeleteObject
(
run
);
if
(
run
)
DeleteObject
(
run
);
if
(
bits
->
free
)
bits
->
free
(
bits
);
bits
->
ptr
=
out_bits
;
...
...
@@ -376,7 +381,7 @@ done:
fail:
if
(
run
)
DeleteObject
(
run
);
if
(
*
clip
)
DeleteObject
(
*
clip
);
if
(
clip
&&
*
clip
)
DeleteObject
(
*
clip
);
HeapFree
(
GetProcessHeap
(),
0
,
out_bits
);
return
FALSE
;
}
...
...
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