As far as I can see, nothing has ever used this flag except possibly
the i.mx6 xorg ddx debug during bringup.

Signed-off-by: Eric Anholt <[email protected]>
---
 hw/kdrive/src/kxv.c          | 46 --------------------------------------------
 hw/kdrive/src/kxv.h          |  1 -
 hw/xfree86/common/xf86xv.c   | 46 --------------------------------------------
 hw/xfree86/common/xf86xv.h   |  1 -
 hw/xfree86/doc/ddxDesign.xml | 19 +-----------------
 5 files changed, 1 insertion(+), 112 deletions(-)

diff --git a/hw/kdrive/src/kxv.c b/hw/kdrive/src/kxv.c
index f808fb0..3d63304 100644
--- a/hw/kdrive/src/kxv.c
+++ b/hw/kdrive/src/kxv.c
@@ -664,18 +664,6 @@ KdXVReputVideo(XvPortRecPrivatePtr portPriv)
         goto CLIP_VIDEO_BAILOUT;
     }
 
-    /* bailout if we have to clip but the hardware doesn't support it */
-    if (portPriv->AdaptorRec->flags & VIDEO_NO_CLIPPING) {
-        BoxPtr clipBox = RegionRects(&ClipRegion);
-
-        if ((RegionNumRects(&ClipRegion) != 1) ||
-            (clipBox->x1 != WinBox.x1) || (clipBox->x2 != WinBox.x2) ||
-            (clipBox->y1 != WinBox.y1) || (clipBox->y2 != WinBox.y2)) {
-            clippedAway = TRUE;
-            goto CLIP_VIDEO_BAILOUT;
-        }
-    }
-
     ret = (*portPriv->AdaptorRec->PutVideo) (portPriv->screen, portPriv->pDraw,
                                              portPriv->vid_x, portPriv->vid_y,
                                              WinBox.x1, WinBox.y1,
@@ -752,18 +740,6 @@ KdXVReputImage(XvPortRecPrivatePtr portPriv)
         goto CLIP_VIDEO_BAILOUT;
     }
 
-    /* bailout if we have to clip but the hardware doesn't support it */
-    if (portPriv->AdaptorRec->flags & VIDEO_NO_CLIPPING) {
-        BoxPtr clipBox = RegionRects(&ClipRegion);
-
-        if ((RegionNumRects(&ClipRegion) != 1) ||
-            (clipBox->x1 != WinBox.x1) || (clipBox->x2 != WinBox.x2) ||
-            (clipBox->y1 != WinBox.y1) || (clipBox->y2 != WinBox.y2)) {
-            clippedAway = TRUE;
-            goto CLIP_VIDEO_BAILOUT;
-        }
-    }
-
     ret =
         (*portPriv->AdaptorRec->ReputImage) (portPriv->screen, portPriv->pDraw,
                                              WinBox.x1, WinBox.y1, &ClipRegion,
@@ -1251,17 +1227,6 @@ KdXVPutStill(ClientPtr client,
         goto PUT_STILL_BAILOUT;
     }
 
-    if (portPriv->AdaptorRec->flags & VIDEO_NO_CLIPPING) {
-        BoxPtr clipBox = RegionRects(&ClipRegion);
-
-        if ((RegionNumRects(&ClipRegion) != 1) ||
-            (clipBox->x1 != WinBox.x1) || (clipBox->x2 != WinBox.x2) ||
-            (clipBox->y1 != WinBox.y1) || (clipBox->y2 != WinBox.y2)) {
-            clippedAway = TRUE;
-            goto PUT_STILL_BAILOUT;
-        }
-    }
-
     ret = (*portPriv->AdaptorRec->PutStill) (portPriv->screen, pDraw,
                                              vid_x, vid_y, WinBox.x1, 
WinBox.y1,
                                              vid_w, vid_h, drw_w, drw_h,
@@ -1541,17 +1506,6 @@ KdXVPutImage(ClientPtr client,
         goto PUT_IMAGE_BAILOUT;
     }
 
-    if (portPriv->AdaptorRec->flags & VIDEO_NO_CLIPPING) {
-        BoxPtr clipBox = RegionRects(&ClipRegion);
-
-        if ((RegionNumRects(&ClipRegion) != 1) ||
-            (clipBox->x1 != WinBox.x1) || (clipBox->x2 != WinBox.x2) ||
-            (clipBox->y1 != WinBox.y1) || (clipBox->y2 != WinBox.y2)) {
-            clippedAway = TRUE;
-            goto PUT_IMAGE_BAILOUT;
-        }
-    }
-
     ret = (*portPriv->AdaptorRec->PutImage) (portPriv->screen, pDraw,
                                              src_x, src_y, WinBox.x1, 
WinBox.y1,
                                              src_w, src_h, drw_w, drw_h,
diff --git a/hw/kdrive/src/kxv.h b/hw/kdrive/src/kxv.h
index adedbda..fe467a9 100644
--- a/hw/kdrive/src/kxv.h
+++ b/hw/kdrive/src/kxv.h
@@ -50,7 +50,6 @@ of the copyright holder.
 
 #include "../../Xext/xvdix.h"
 
-#define VIDEO_NO_CLIPPING                      0x00000001
 #define VIDEO_OVERLAID_IMAGES                  0x00000004
 #define VIDEO_OVERLAID_STILLS                  0x00000008
 #define VIDEO_CLIP_TO_VIEWPORT                 0x00000010
diff --git a/hw/xfree86/common/xf86xv.c b/hw/xfree86/common/xf86xv.c
index bb91758..6302b8d 100644
--- a/hw/xfree86/common/xf86xv.c
+++ b/hw/xfree86/common/xf86xv.c
@@ -784,18 +784,6 @@ xf86XVReputVideo(XvPortRecPrivatePtr portPriv)
         goto CLIP_VIDEO_BAILOUT;
     }
 
-    /* bailout if we have to clip but the hardware doesn't support it */
-    if (portPriv->AdaptorRec->flags & VIDEO_NO_CLIPPING) {
-        BoxPtr clipBox = RegionRects(&ClipRegion);
-
-        if ((RegionNumRects(&ClipRegion) != 1) ||
-            (clipBox->x1 != WinBox.x1) || (clipBox->x2 != WinBox.x2) ||
-            (clipBox->y1 != WinBox.y1) || (clipBox->y2 != WinBox.y2)) {
-            clippedAway = TRUE;
-            goto CLIP_VIDEO_BAILOUT;
-        }
-    }
-
     ret = (*portPriv->AdaptorRec->PutVideo) (portPriv->pScrn,
                                              portPriv->vid_x, portPriv->vid_y,
                                              WinBox.x1, WinBox.y1,
@@ -874,18 +862,6 @@ xf86XVReputImage(XvPortRecPrivatePtr portPriv)
         goto CLIP_VIDEO_BAILOUT;
     }
 
-    /* bailout if we have to clip but the hardware doesn't support it */
-    if (portPriv->AdaptorRec->flags & VIDEO_NO_CLIPPING) {
-        BoxPtr clipBox = RegionRects(&ClipRegion);
-
-        if ((RegionNumRects(&ClipRegion) != 1) ||
-            (clipBox->x1 != WinBox.x1) || (clipBox->x2 != WinBox.x2) ||
-            (clipBox->y1 != WinBox.y1) || (clipBox->y2 != WinBox.y2)) {
-            clippedAway = TRUE;
-            goto CLIP_VIDEO_BAILOUT;
-        }
-    }
-
     ret = (*portPriv->AdaptorRec->ReputImage) (portPriv->pScrn,
                                                portPriv->vid_x, 
portPriv->vid_y,
                                                WinBox.x1, WinBox.y1,
@@ -1468,17 +1444,6 @@ xf86XVPutStill(ClientPtr client,
         goto PUT_STILL_BAILOUT;
     }
 
-    if (portPriv->AdaptorRec->flags & VIDEO_NO_CLIPPING) {
-        BoxPtr clipBox = RegionRects(&ClipRegion);
-
-        if ((RegionNumRects(&ClipRegion) != 1) ||
-            (clipBox->x1 != WinBox.x1) || (clipBox->x2 != WinBox.x2) ||
-            (clipBox->y1 != WinBox.y1) || (clipBox->y2 != WinBox.y2)) {
-            clippedAway = TRUE;
-            goto PUT_STILL_BAILOUT;
-        }
-    }
-
     ret = (*portPriv->AdaptorRec->PutStill) (portPriv->pScrn,
                                              vid_x, vid_y, WinBox.x1, 
WinBox.y1,
                                              vid_w, vid_h, drw_w, drw_h,
@@ -1760,17 +1725,6 @@ xf86XVPutImage(ClientPtr client,
         goto PUT_IMAGE_BAILOUT;
     }
 
-    if (portPriv->AdaptorRec->flags & VIDEO_NO_CLIPPING) {
-        BoxPtr clipBox = RegionRects(&ClipRegion);
-
-        if ((RegionNumRects(&ClipRegion) != 1) ||
-            (clipBox->x1 != WinBox.x1) || (clipBox->x2 != WinBox.x2) ||
-            (clipBox->y1 != WinBox.y1) || (clipBox->y2 != WinBox.y2)) {
-            clippedAway = TRUE;
-            goto PUT_IMAGE_BAILOUT;
-        }
-    }
-
     ret = (*portPriv->AdaptorRec->PutImage) (portPriv->pScrn,
                                              src_x, src_y, WinBox.x1, 
WinBox.y1,
                                              src_w, src_h, drw_w, drw_h,
diff --git a/hw/xfree86/common/xf86xv.h b/hw/xfree86/common/xf86xv.h
index fc6cf5d..c6455d7 100644
--- a/hw/xfree86/common/xf86xv.h
+++ b/hw/xfree86/common/xf86xv.h
@@ -32,7 +32,6 @@
 #include "xvdix.h"
 #include "xf86str.h"
 
-#define VIDEO_NO_CLIPPING                      0x00000001
 #define VIDEO_OVERLAID_IMAGES                  0x00000004
 #define VIDEO_OVERLAID_STILLS                  0x00000008
 /*
diff --git a/hw/xfree86/doc/ddxDesign.xml b/hw/xfree86/doc/ddxDesign.xml
index 00aeea9..9536d2a 100644
--- a/hw/xfree86/doc/ddxDesign.xml
+++ b/hw/xfree86/doc/ddxDesign.xml
@@ -4543,21 +4543,6 @@ as follows:
 
              <variablelist>
                <varlistentry>
-                 <term><constant>VIDEO_NO_CLIPPING</constant></term>
-                 <listitem><para>
-          This indicates that the video adaptor does not support
-          clipping.  The driver will never receive <quote>Put</quote> requests
-          where less than the entire area determined by
-          <parameter>drw_x</parameter>, <parameter>drw_y</parameter>,
-          <parameter>drw_w</parameter> and <parameter>drw_h</parameter> is 
visible.
-          This flag does not apply to <quote>Get</quote> requests.  Hardware
-          that is incapable of clipping <quote>Gets</quote> may punt or get
-          the extents of the clipping region passed to it.
-                   </para></listitem>
-
-               </varlistentry>
-
-               <varlistentry>
                  <term><constant>VIDEO_OVERLAID_STILLS</constant></term>
                  <listitem><para>
           Implementing PutStill for hardware that does video as an
@@ -4714,9 +4699,7 @@ as follows:
            </para>
 
            <para>
-       If the <constant>VIDEO_NO_CLIPPING</constant>
-       flag is set, the <literal remap="tt">clipBoxes</literal> may be ignored 
by
-       the driver.  <literal remap="tt">ClipBoxes</literal> is an <literal 
remap="tt">X-Y</literal>
+       <literal remap="tt">ClipBoxes</literal> is an <literal 
remap="tt">X-Y</literal>
        banded region identical to those used throughout the server.
        The clipBoxes represent the visible portions of the area determined
        by <literal remap="tt">drw_x</literal>, <literal 
remap="tt">drw_y</literal>,
-- 
2.0.1

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to