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
560b13c2
Commit
560b13c2
authored
Nov 01, 2015
by
Bruno Jesus
Committed by
Alexandre Julliard
Nov 02, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvfw32: Make it clear why a DrawDibBegin call is required.
Signed-off-by:
Bruno Jesus
<
00cpxxx@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
2ccba1cf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
8 deletions
+24
-8
drawdib.c
dlls/msvfw32/drawdib.c
+24
-8
No files found.
dlls/msvfw32/drawdib.c
View file @
560b13c2
...
...
@@ -313,7 +313,8 @@ BOOL VFWAPI DrawDibDraw(HDRAWDIB hdd, HDC hdc,
UINT
wFlags
)
{
WINE_HDD
*
whdd
;
BOOL
ret
=
TRUE
;
BOOL
ret
;
int
reopen
=
0
;
TRACE
(
"(%p,%p,%d,%d,%d,%d,%p,%p,%d,%d,%d,%d,0x%08x)
\n
"
,
hdd
,
hdc
,
xDst
,
yDst
,
dxDst
,
dyDst
,
lpbi
,
lpBits
,
xSrc
,
ySrc
,
dxSrc
,
dySrc
,
wFlags
);
...
...
@@ -335,11 +336,25 @@ BOOL VFWAPI DrawDibDraw(HDRAWDIB hdd, HDC hdc,
#define CHANGED(x) (whdd->x != x)
if
((
!
whdd
->
begun
)
||
(
!
(
wFlags
&
DDF_SAME_HDC
)
&&
CHANGED
(
hdc
))
||
(
!
(
wFlags
&
DDF_SAME_DRAW
)
&&
(
CHANGED
(
lpbi
)
||
CHANGED
(
dxSrc
)
||
CHANGED
(
dySrc
)
||
CHANGED
(
dxDst
)
||
CHANGED
(
dyDst
))))
/* Check if anything changed from the parameters passed and our struct.
* If anything changed we need to run DrawDibBegin again to ensure we
* can support the changes.
*/
if
(
!
whdd
->
begun
)
reopen
=
1
;
else
if
(
!
(
wFlags
&
DDF_SAME_HDC
)
&&
CHANGED
(
hdc
))
reopen
=
2
;
else
if
(
!
(
wFlags
&
DDF_SAME_DRAW
))
{
TRACE
(
"Something changed!
\n
"
);
if
(
CHANGED
(
lpbi
)
&&
memcmp
(
lpbi
,
whdd
->
lpbi
,
sizeof
(
*
lpbi
)))
reopen
=
3
;
else
if
(
CHANGED
(
dxSrc
))
reopen
=
4
;
else
if
(
CHANGED
(
dySrc
))
reopen
=
5
;
else
if
(
CHANGED
(
dxDst
))
reopen
=
6
;
else
if
(
CHANGED
(
dyDst
))
reopen
=
7
;
}
if
(
reopen
)
{
TRACE
(
"Something changed (reason %d)!
\n
"
,
reopen
);
ret
=
DrawDibBegin
(
hdd
,
hdc
,
dxDst
,
dyDst
,
lpbi
,
dxSrc
,
dySrc
,
0
);
if
(
!
ret
)
return
ret
;
...
...
@@ -388,9 +403,10 @@ BOOL VFWAPI DrawDibDraw(HDRAWDIB hdd, HDC hdc,
SelectPalette
(
hdc
,
whdd
->
hpal
,
FALSE
);
}
if
(
!
(
StretchBlt
(
whdd
->
hdc
,
xDst
,
yDst
,
dxDst
,
dyDst
,
whdd
->
hMemDC
,
xSrc
,
ySrc
,
dxSrc
,
dySrc
,
SRCCOPY
)))
ret
=
FALSE
;
ret
=
StretchBlt
(
whdd
->
hdc
,
xDst
,
yDst
,
dxDst
,
dyDst
,
whdd
->
hMemDC
,
xSrc
,
ySrc
,
dxSrc
,
dySrc
,
SRCCOPY
);
TRACE
(
"Painting %dx%d at %d,%d from %dx%d at %d,%d -> %d
\n
"
,
dxDst
,
dyDst
,
xDst
,
yDst
,
dxSrc
,
dySrc
,
xSrc
,
ySrc
,
ret
);
return
ret
;
}
...
...
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