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
ccfbcfaf
Commit
ccfbcfaf
authored
Jan 02, 2012
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Calculate the image size in GradientFill only once we have the correct bit count.
parent
a38a496a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
8 deletions
+7
-8
bitblt.c
dlls/gdi32/bitblt.c
+7
-8
No files found.
dlls/gdi32/bitblt.c
View file @
ccfbcfaf
...
...
@@ -395,7 +395,7 @@ BOOL nulldrv_GradientFill( PHYSDEV dev, TRIVERTEX *vert_array, ULONG nvert,
struct
gdi_image_bits
bits
;
unsigned
int
i
;
POINT
*
pts
;
BOOL
ret
=
TRU
E
;
BOOL
ret
=
FALS
E
;
DWORD
err
;
HRGN
rgn
;
...
...
@@ -436,15 +436,14 @@ BOOL nulldrv_GradientFill( PHYSDEV dev, TRIVERTEX *vert_array, ULONG nvert,
info
->
bmiHeader
.
biClrImportant
=
0
;
info
->
bmiHeader
.
biWidth
=
dst
.
visrect
.
right
-
dst
.
visrect
.
left
;
info
->
bmiHeader
.
biHeight
=
dst
.
visrect
.
bottom
-
dst
.
visrect
.
top
;
info
->
bmiHeader
.
biSizeImage
=
get_dib_image_size
(
info
)
;
info
->
bmiHeader
.
biSizeImage
=
0
;
dev
=
GET_DC_PHYSDEV
(
dc
,
pPutImage
);
err
=
dev
->
funcs
->
pPutImage
(
dev
,
0
,
0
,
info
,
NULL
,
NULL
,
NULL
,
0
);
if
(
(
err
&&
err
!=
ERROR_BAD_FORMAT
)
||
!
(
bits
.
ptr
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
info
->
bmiHeader
.
biSizeImage
)))
{
ret
=
FALSE
;
if
(
err
&&
err
!=
ERROR_BAD_FORMAT
)
goto
done
;
info
->
bmiHeader
.
biSizeImage
=
get_dib_image_size
(
info
);
if
(
!
(
bits
.
ptr
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
info
->
bmiHeader
.
biSizeImage
)))
goto
done
;
}
bits
.
is_copy
=
TRUE
;
bits
.
free
=
free_heap_bits
;
...
...
@@ -462,7 +461,7 @@ BOOL nulldrv_GradientFill( PHYSDEV dev, TRIVERTEX *vert_array, ULONG nvert,
rgn
=
CreateRectRgn
(
0
,
0
,
0
,
0
);
gradient_bitmapinfo
(
info
,
bits
.
ptr
,
vert_array
,
nvert
,
grad_array
,
ngrad
,
mode
,
pts
,
rgn
);
OffsetRgn
(
rgn
,
dst
.
visrect
.
left
,
dst
.
visrect
.
top
);
if
(
dev
->
funcs
->
pPutImage
(
dev
,
0
,
rgn
,
info
,
&
bits
,
&
src
,
&
dst
,
SRCCOPY
))
ret
=
FALSE
;
ret
=
!
dev
->
funcs
->
pPutImage
(
dev
,
0
,
rgn
,
info
,
&
bits
,
&
src
,
&
dst
,
SRCCOPY
)
;
if
(
bits
.
free
)
bits
.
free
(
&
bits
);
DeleteObject
(
rgn
);
...
...
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