st/xorg: Fix compilation errors for Xservers compiled without Composite
authorThomas Hellstrom <thellstrom@vmware.com>
Tue, 19 Oct 2010 07:35:16 +0000 (09:35 +0200)
committerThomas Hellstrom <thellstrom@vmware.com>
Tue, 19 Oct 2010 09:28:08 +0000 (11:28 +0200)
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
src/gallium/state_trackers/xorg/xorg_xv.c

index f98bd9390104018ba262ba37d75754a81bb849e9..f64959f00e914620bc8ec84cc3358e9a2124ae04 100644 (file)
@@ -536,8 +536,10 @@ display_video(ScrnInfoPtr pScrn, struct xorg_xv_port_priv *pPriv, int id,
    dst_surf = xorg_gpu_surface(pPriv->r->pipe->screen, dst);
    hdtv = ((src_w >= RES_720P_X) && (src_h >= RES_720P_Y));
 
+#ifdef COMPOSITE
    REGION_TRANSLATE(pScrn->pScreen, dstRegion, -pPixmap->screen_x,
                     -pPixmap->screen_y);
+#endif
 
    dxo = dstRegion->extents.x1;
    dyo = dstRegion->extents.y1;
@@ -562,11 +564,16 @@ display_video(ScrnInfoPtr pScrn, struct xorg_xv_port_priv *pPriv, int id,
       int box_y2 = pbox->y2;
       float diff_x = (float)src_w / (float)dst_w;
       float diff_y = (float)src_h / (float)dst_h;
-      float offset_x = box_x1 - dstX + pPixmap->screen_x;
-      float offset_y = box_y1 - dstY + pPixmap->screen_y;
+      float offset_x = box_x1 - dstX;
+      float offset_y = box_y1 - dstY;
       float offset_w;
       float offset_h;
 
+#ifdef COMPOSITE
+      offset_x += pPixmap->screen_x;
+      offset_y += pPixmap->screen_y;
+#endif
+
       x = box_x1;
       y = box_y1;
       w = box_x2 - box_x1;