diff options
author | Alex Deucher <alexdeucher@gmail.com> | 2010-05-18 11:21:01 -0400 |
---|---|---|
committer | Alex Deucher <alexdeucher@gmail.com> | 2010-05-18 11:21:01 -0400 |
commit | 842fa162e9d3bbad2bc44d3732bbc8e5a54402ea (patch) | |
tree | 4fdb2727376f6e35992ec982c07117394658fa75 | |
parent | 64e6858aaf5d0e39ecc9f9804689012f3a38660a (diff) |
dri2: use radeon_pick_best_crtc()
It's already exposed and used by exa and Xv and has
the same functionality. radeon_covering_crtc() can
be dropped eventually.
-rw-r--r-- | src/radeon_dri2.c | 12 | ||||
-rw-r--r-- | src/radeon_video.c | 4 |
2 files changed, 7 insertions, 9 deletions
diff --git a/src/radeon_dri2.c b/src/radeon_dri2.c index 0e6292e3..7d5205e9 100644 --- a/src/radeon_dri2.c +++ b/src/radeon_dri2.c @@ -399,16 +399,14 @@ static int radeon_dri2_drawable_crtc(DrawablePtr pDraw) { ScreenPtr pScreen = pDraw->pScreen; ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; - BoxRec box, crtcbox; xf86CrtcPtr crtc; int crtc_id = -1; - box.x1 = pDraw->x; - box.y1 = pDraw->y; - box.x2 = box.x1 + pDraw->width; - box.y2 = box.y1 + pDraw->height; - - crtc = radeon_covering_crtc(pScrn, &box, NULL, &crtcbox); + crtc = radeon_pick_best_crtc(pScrn, + pDraw->x, + pDraw->x + pDraw->width, + pDraw->y, + pDraw->y + pDraw->height); /* Make sure the CRTC is valid and this is the real front buffer */ if (crtc != NULL && !crtc->rotatedData) { diff --git a/src/radeon_video.c b/src/radeon_video.c index 7b5f6dec..5e2a7238 100644 --- a/src/radeon_video.c +++ b/src/radeon_video.c @@ -162,7 +162,8 @@ radeon_pick_best_crtc(ScrnInfoPtr pScrn, return best_crtc; } -xf86CrtcPtr +#ifndef HAVE_XF86CRTCCLIPVIDEOHELPER +static xf86CrtcPtr radeon_covering_crtc(ScrnInfoPtr pScrn, BoxPtr box, xf86CrtcPtr desired, @@ -197,7 +198,6 @@ radeon_covering_crtc(ScrnInfoPtr pScrn, return best_crtc; } -#ifndef HAVE_XF86CRTCCLIPVIDEOHELPER static Bool radeon_crtc_clip_video_helper(ScrnInfoPtr pScrn, xf86CrtcPtr *crtc_ret, |