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
497c3982
Commit
497c3982
authored
Sep 13, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Move coordinate checks into the common part of GdiAlphaBlend.
parent
271530b3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
12 deletions
+19
-12
bitblt.c
dlls/gdi32/bitblt.c
+17
-1
xrender.c
dlls/winex11.drv/xrender.c
+2
-11
No files found.
dlls/gdi32/bitblt.c
View file @
497c3982
...
...
@@ -669,7 +669,23 @@ BOOL WINAPI GdiAlphaBlend(HDC hdcDst, int xDst, int yDst, int widthDst, int heig
blendFunction
.
BlendOp
,
blendFunction
.
BlendFlags
,
blendFunction
.
SourceConstantAlpha
,
blendFunction
.
AlphaFormat
);
if
(
!
ret
)
ret
=
dst_dev
->
funcs
->
pAlphaBlend
(
dst_dev
,
&
dst
,
src_dev
,
&
src
,
blendFunction
);
if
(
src
.
x
<
0
||
src
.
y
<
0
||
src
.
width
<
0
||
src
.
height
<
0
||
(
dcSrc
->
header
.
type
==
OBJ_MEMDC
&&
(
src
.
width
>
dcSrc
->
vis_rect
.
right
-
dcSrc
->
vis_rect
.
left
-
src
.
x
||
src
.
height
>
dcSrc
->
vis_rect
.
bottom
-
dcSrc
->
vis_rect
.
top
-
src
.
y
)))
{
WARN
(
"Invalid src coords: (%d,%d), size %dx%d
\n
"
,
src
.
x
,
src
.
y
,
src
.
width
,
src
.
height
);
SetLastError
(
ERROR_INVALID_PARAMETER
);
ret
=
FALSE
;
}
else
if
(
dst
.
width
<
0
||
dst
.
height
<
0
)
{
WARN
(
"Invalid dst coords: (%d,%d), size %dx%d
\n
"
,
dst
.
x
,
dst
.
y
,
dst
.
width
,
dst
.
height
);
SetLastError
(
ERROR_INVALID_PARAMETER
);
ret
=
FALSE
;
}
else
if
(
!
ret
)
ret
=
dst_dev
->
funcs
->
pAlphaBlend
(
dst_dev
,
&
dst
,
src_dev
,
&
src
,
blendFunction
);
release_dc_ptr
(
dcDst
);
}
release_dc_ptr
(
dcSrc
);
...
...
dlls/winex11.drv/xrender.c
View file @
497c3982
...
...
@@ -2396,22 +2396,13 @@ static BOOL xrenderdrv_AlphaBlend( PHYSDEV dst_dev, struct bitblt_coords *dst,
double
xscale
,
yscale
;
BOOL
use_repeat
;
if
(
src
->
x
<
0
||
src
->
y
<
0
||
src
->
width
<
0
||
src
->
height
<
0
||
src
->
width
>
physdev_src
->
x11dev
->
drawable_rect
.
right
-
physdev_src
->
x11dev
->
drawable_rect
.
left
-
src
->
x
||
src
->
height
>
physdev_src
->
x11dev
->
drawable_rect
.
bottom
-
physdev_src
->
x11dev
->
drawable_rect
.
top
-
src
->
y
)
{
WARN
(
"Invalid src coords: (%d,%d), size %dx%d
\n
"
,
src
->
x
,
src
->
y
,
src
->
width
,
src
->
height
);
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
}
if
(
!
X11DRV_XRender_Installed
||
src_dev
->
funcs
!=
dst_dev
->
funcs
)
{
dst_dev
=
GET_NEXT_PHYSDEV
(
dst_dev
,
pAlphaBlend
);
return
dst_dev
->
funcs
->
pAlphaBlend
(
dst_dev
,
dst
,
src_dev
,
src
,
blendfn
);
}
if
(
physdev_src
->
x11dev
!=
physdev_dst
->
x11dev
)
X11DRV_LockDIBSection
(
physdev_src
->
x11dev
,
DIB_Status_GdiMod
);
if
(
physdev_src
!=
physdev_dst
)
X11DRV_LockDIBSection
(
physdev_src
->
x11dev
,
DIB_Status_GdiMod
);
X11DRV_LockDIBSection
(
physdev_dst
->
x11dev
,
DIB_Status_GdiMod
);
dst_pict
=
get_xrender_picture
(
physdev_dst
->
x11dev
);
...
...
@@ -2460,7 +2451,7 @@ static BOOL xrenderdrv_AlphaBlend( PHYSDEV dst_dev, struct bitblt_coords *dst,
wine_tsx11_unlock
();
LeaveCriticalSection
(
&
xrender_cs
);
if
(
physdev_src
->
x11dev
!=
physdev_dst
->
x11dev
)
X11DRV_UnlockDIBSection
(
physdev_src
->
x11dev
,
FALSE
);
if
(
physdev_src
!=
physdev_dst
)
X11DRV_UnlockDIBSection
(
physdev_src
->
x11dev
,
FALSE
);
X11DRV_UnlockDIBSection
(
physdev_dst
->
x11dev
,
TRUE
);
return
TRUE
;
}
...
...
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