summaryrefslogtreecommitdiff
path: root/src/radeon_dri2.c
diff options
context:
space:
mode:
authorAlex Deucher <alexdeucher@gmail.com>2010-05-18 11:21:01 -0400
committerAlex Deucher <alexdeucher@gmail.com>2010-05-18 11:21:01 -0400
commit842fa162e9d3bbad2bc44d3732bbc8e5a54402ea (patch)
tree4fdb2727376f6e35992ec982c07117394658fa75 /src/radeon_dri2.c
parent64e6858aaf5d0e39ecc9f9804689012f3a38660a (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.
Diffstat (limited to 'src/radeon_dri2.c')
-rw-r--r--src/radeon_dri2.c12
1 files changed, 5 insertions, 7 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) {