Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
92ec21bd
Commit
92ec21bd
authored
Oct 27, 2004
by
Kevin Koltzau
Committed by
Alexandre Julliard
Oct 27, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add stretching support to AlphaBlend.
parent
e86389e0
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
115 additions
and
3 deletions
+115
-3
configure
configure
+75
-0
configure.ac
configure.ac
+9
-0
xrender.c
dlls/x11drv/xrender.c
+28
-3
config.h.in
include/config.h.in
+3
-0
No files found.
configure
View file @
92ec21bd
...
...
@@ -7992,6 +7992,81 @@ 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
fi
...
...
configure.ac
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
...
...
dlls/x11drv/xrender.c
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
);
...
...
include/config.h.in
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
...
...
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