diff options
author | Alex Deucher <alex@botch2.(none)> | 2007-12-20 01:09:57 -0500 |
---|---|---|
committer | Alex Deucher <alex@botch2.(none)> | 2007-12-20 01:09:57 -0500 |
commit | 8d49ff1da917b7f8240267953ef6ce4ff04daecb (patch) | |
tree | 5b2bc71c3c675ba28f5286993024657a7d39bd50 /src/radeon_video.c | |
parent | fb7a4e24f2da3561ef81371ca4013a4f13806e91 (diff) |
RADEON: check for xf86_crtc_clip_video_helper() in configure.ac
use xf86_crtc_clip_video_helper() from the server if available.
Diffstat (limited to 'src/radeon_video.c')
-rw-r--r-- | src/radeon_video.c | 66 |
1 files changed, 46 insertions, 20 deletions
diff --git a/src/radeon_video.c b/src/radeon_video.c index 3f0209ed..2b5764f2 100644 --- a/src/radeon_video.c +++ b/src/radeon_video.c @@ -119,6 +119,7 @@ static Atom xvOvAlpha, xvGrAlpha, xvAlphaMode; #define GET_PORT_PRIVATE(pScrn) \ (RADEONPortPrivPtr)((RADEONPTR(pScrn))->adaptor->pPortPrivates[0].ptr) +#ifndef HAVE_XF86CRTCCLIPVIDEOHELPER static void radeon_box_intersect(BoxPtr dest, BoxPtr a, BoxPtr b) { @@ -185,17 +186,17 @@ radeon_covering_crtc(ScrnInfoPtr pScrn, } static Bool -radeon_clip_video_helper(ScrnInfoPtr pScrn, - xf86CrtcPtr *crtc_ret, - xf86CrtcPtr desired_crtc, - BoxPtr dst, - INT32 *xa, - INT32 *xb, - INT32 *ya, - INT32 *yb, - RegionPtr reg, - INT32 width, - INT32 height) +radeon_crtc_clip_video_helper(ScrnInfoPtr pScrn, + xf86CrtcPtr *crtc_ret, + xf86CrtcPtr desired_crtc, + BoxPtr dst, + INT32 *xa, + INT32 *xb, + INT32 *ya, + INT32 *yb, + RegionPtr reg, + INT32 width, + INT32 height) { Bool ret; RegionRec crtc_region_local; @@ -227,6 +228,31 @@ radeon_clip_video_helper(ScrnInfoPtr pScrn, return ret; } +#endif + +static Bool +radeon_crtc_clip_video(ScrnInfoPtr pScrn, + xf86CrtcPtr *crtc_ret, + xf86CrtcPtr desired_crtc, + BoxPtr dst, + INT32 *xa, + INT32 *xb, + INT32 *ya, + INT32 *yb, + RegionPtr reg, + INT32 width, + INT32 height) +{ +#ifndef HAVE_XF86CRTCCLIPVIDEOHELPER + return radeon_crtc_clip_video_helper(pScrn, crtc_ret, desired_crtc, + dst, xa, xb, ya, yb, + reg, width, height); +#else + return xf86_crtc_clip_video_helper(pScrn, crtc_ret, desired_crtc, + dst, xa, xb, ya, yb, + reg, width, height); +#endif +} #ifdef USE_EXA static void @@ -2899,9 +2925,9 @@ RADEONPutImage( dstBox.y1 = drw_y; dstBox.y2 = drw_y + drw_h; - if (!radeon_clip_video_helper(pScrn, &crtc, pPriv->desired_crtc, - &dstBox, &xa, &xb, &ya, &yb, - clipBoxes, width, height)) + if (!radeon_crtc_clip_video(pScrn, &crtc, pPriv->desired_crtc, + &dstBox, &xa, &xb, &ya, &yb, + clipBoxes, width, height)) return Success; if (!crtc) { @@ -3295,9 +3321,9 @@ RADEONDisplaySurface( dstBox.y1 = drw_y; dstBox.y2 = drw_y + drw_h; - if (!radeon_clip_video_helper(pScrn, &crtc, portPriv->desired_crtc, - &dstBox, &xa, &xb, &ya, &yb, clipBoxes, - surface->width, surface->height)) + if (!radeon_crtc_clip_video(pScrn, &crtc, portPriv->desired_crtc, + &dstBox, &xa, &xb, &ya, &yb, clipBoxes, + surface->width, surface->height)) return Success; if (!crtc) { @@ -3438,9 +3464,9 @@ RADEONPutVideo( else vbi_line_width = 2000; /* might need adjustment */ - if (!radeon_clip_video_helper(pScrn, &crtc, pPriv->desired_crtc, - &dstBox, &xa, &xb, &ya, &yb, - clipBoxes, width, height)) + if (!radeon_crtc_clip_video(pScrn, &crtc, pPriv->desired_crtc, + &dstBox, &xa, &xb, &ya, &yb, + clipBoxes, width, height)) return Success; if (!crtc) { |