Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Zsolt Vadász
wine
Commits
92ec21bd
Commit
92ec21bd
authored
20 years ago
by
Kevin Koltzau
Committed by
Alexandre Julliard
20 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Add stretching support to AlphaBlend.
parent
e86389e0
Loading
Loading
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
configure
+75
-0
75 additions, 0 deletions
configure
configure.ac
+9
-0
9 additions, 0 deletions
configure.ac
dlls/x11drv/xrender.c
+28
-3
28 additions, 3 deletions
dlls/x11drv/xrender.c
include/config.h.in
+3
-0
3 additions, 0 deletions
include/config.h.in
with
115 additions
and
3 deletions
configure
+
75
−
0
View file @
92ec21bd
...
...
@@ -7988,6 +7988,81 @@ _ACEOF
X_PRE_LIBS="$X_PRE_LIBS -lXv"
fi
fi
if test "$ac_cv_header_X11_extensions_Xrender_h" = "yes"
then
echo "$as_me:$LINENO: checking for XRenderSetPictureTransform in -lXrender" >&5
echo $ECHO_N "checking for XRenderSetPictureTransform in -lXrender... $ECHO_C" >&6
if test "${ac_cv_lib_Xrender_XRenderSetPictureTransform+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lXrender $X_LIBS -lXext -lX11 $X_EXTRA_LIBS $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char XRenderSetPictureTransform ();
int
main ()
{
XRenderSetPictureTransform ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_Xrender_XRenderSetPictureTransform=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_Xrender_XRenderSetPictureTransform=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_Xrender_XRenderSetPictureTransform" >&5
echo "${ECHO_T}$ac_cv_lib_Xrender_XRenderSetPictureTransform" >&6
if test $ac_cv_lib_Xrender_XRenderSetPictureTransform = yes; then
cat >>confdefs.h <<\_ACEOF
#define HAVE_XRENDERSETPICTURETRANSFORM 1
_ACEOF
fi
fi
...
...
This diff is collapsed.
Click to expand it.
configure.ac
+
9
−
0
View file @
92ec21bd
...
...
@@ -257,6 +257,15 @@ then
],,
$X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
fi
dnl *** Check for Transform functions in Xrender
if test "$ac_cv_header_X11_extensions_Xrender_h" = "yes"
then
AC_CHECK_LIB(Xrender, XRenderSetPictureTransform,
[AC_DEFINE(HAVE_XRENDERSETPICTURETRANSFORM, 1,
[Define if Xrender has the XRenderSetPictureTransform function])],,
$X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
fi
]
) dnl *** End of X11/Xlib.h check
...
...
This diff is collapsed.
Click to expand it.
dlls/x11drv/xrender.c
+
28
−
3
View file @
92ec21bd
...
...
@@ -130,6 +130,9 @@ MAKE_FUNCPTR(XRenderFindVisualFormat)
MAKE_FUNCPTR
(
XRenderFreeGlyphSet
)
MAKE_FUNCPTR
(
XRenderFreePicture
)
MAKE_FUNCPTR
(
XRenderSetPictureClipRectangles
)
#ifdef HAVE_XRENDERSETPICTURETRANSFORM
MAKE_FUNCPTR
(
XRenderSetPictureTransform
)
#endif
MAKE_FUNCPTR
(
XRenderQueryExtension
)
#undef MAKE_FUNCPTR
...
...
@@ -177,6 +180,12 @@ LOAD_FUNCPTR(XRenderFreePicture)
LOAD_FUNCPTR
(
XRenderSetPictureClipRectangles
)
LOAD_FUNCPTR
(
XRenderQueryExtension
)
#undef LOAD_FUNCPTR
#ifdef HAVE_XRENDERSETPICTURETRANSFORM
#define LOAD_OPTIONAL_FUNCPTR(f) p##f = wine_dlsym(xrender_handle, #f, NULL, 0);
LOAD_OPTIONAL_FUNCPTR
(
XRenderSetPictureTransform
)
#undef LOAD_OPTIONAL_FUNCPTR
#endif
wine_tsx11_lock
();
if
(
pXRenderQueryExtension
(
gdi_display
,
&
event_base
,
&
error_base
))
{
...
...
@@ -1561,9 +1570,13 @@ BOOL X11DRV_AlphaBlend(X11DRV_PDEVICE *devDst, INT xDst, INT yDst, INT widthDst,
widthSrc
=
pts
[
1
].
x
-
pts
[
0
].
x
;
heightSrc
=
pts
[
1
].
y
-
pts
[
0
].
y
;
if
(
widthDst
!=
widthSrc
||
heightDst
!=
heightSrc
)
{
FIXME
(
"Unable to Stretch
\n
"
);
#ifndef HAVE_XRENDERSETPICTURETRANSFORM
if
(
widthDst
!=
widthSrc
||
heightDst
!=
heightSrc
)
#else
if
(
!
pXRenderSetPictureTransform
)
#endif
{
FIXME
(
"Unable to Stretch, XRenderSetPictureTransform is currently required
\n
"
);
return
FALSE
;
}
...
...
@@ -1624,6 +1637,18 @@ BOOL X11DRV_AlphaBlend(X11DRV_PDEVICE *devDst, INT xDst, INT yDst, INT widthDst,
CPSubwindowMode
,
&
pa
);
TRACE
(
"src_pict %08lx
\n
"
,
src_pict
);
#ifdef HAVE_XRENDERSETPICTURETRANSFORM
if
(
widthDst
!=
widthSrc
||
heightDst
!=
heightSrc
)
{
double
xscale
=
widthSrc
/
(
double
)
widthDst
;
double
yscale
=
heightSrc
/
(
double
)
heightDst
;
XTransform
xform
=
{{
{
XDoubleToFixed
(
xscale
),
XDoubleToFixed
(
0
),
XDoubleToFixed
(
0
)
},
{
XDoubleToFixed
(
0
),
XDoubleToFixed
(
yscale
),
XDoubleToFixed
(
0
)
},
{
XDoubleToFixed
(
0
),
XDoubleToFixed
(
0
),
XDoubleToFixed
(
1
)
}
}};
pXRenderSetPictureTransform
(
gdi_display
,
src_pict
,
&
xform
);
}
#endif
pXRenderComposite
(
gdi_display
,
PictOpOver
,
src_pict
,
0
,
dst_pict
,
xSrc
,
ySrc
,
0
,
0
,
xDst
+
devDst
->
org
.
x
,
yDst
+
devDst
->
org
.
y
,
widthSrc
,
heightSrc
);
...
...
This diff is collapsed.
Click to expand it.
include/config.h.in
+
3
−
0
View file @
92ec21bd
...
...
@@ -830,6 +830,9 @@
/* Define if you have the XKB extension */
#undef HAVE_XKB
/* Define if Xrender has the XRenderSetPictureTransform function */
#undef HAVE_XRENDERSETPICTURETRANSFORM
/* Define if the X libraries support XVideo */
#undef HAVE_XVIDEO
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment