[PATCH 11/16] kdrive: Remove dead KXVPaintRegion().

Eric Anholt eric at anholt.net
Fri Jul 18 10:32:28 PDT 2014


It's been unused since mach64 was deleted, and now there's a helper in
core XV.

Signed-off-by: Eric Anholt <eric at anholt.net>
---
 hw/kdrive/src/kxv.c | 41 -----------------------------------------
 hw/kdrive/src/kxv.h |  3 ---
 2 files changed, 44 deletions(-)

diff --git a/hw/kdrive/src/kxv.c b/hw/kdrive/src/kxv.c
index 47e1357..c916af4 100644
--- a/hw/kdrive/src/kxv.c
+++ b/hw/kdrive/src/kxv.c
@@ -1650,44 +1650,3 @@ KdXVCopyPlanarData(KdScreenInfo * screen, CARD8 *src, CARD8 *dst, int randr,
         }
     }
 }
-
-void
-KXVPaintRegion(DrawablePtr pDraw, RegionPtr pRgn, Pixel fg)
-{
-    GCPtr pGC;
-    ChangeGCVal val[2];
-    xRectangle *rects, *r;
-    BoxPtr pBox = RegionRects(pRgn);
-    int nBox = RegionNumRects(pRgn);
-
-    rects = malloc(nBox * sizeof(xRectangle));
-    if (!rects)
-        goto bail0;
-    r = rects;
-    while (nBox--) {
-        r->x = pBox->x1 - pDraw->x;
-        r->y = pBox->y1 - pDraw->y;
-        r->width = pBox->x2 - pBox->x1;
-        r->height = pBox->y2 - pBox->y1;
-        r++;
-        pBox++;
-    }
-
-    pGC = GetScratchGC(pDraw->depth, pDraw->pScreen);
-    if (!pGC)
-        goto bail1;
-
-    val[0].val = fg;
-    val[1].val = IncludeInferiors;
-    ChangeGC(NullClient, pGC, GCForeground | GCSubwindowMode, val);
-
-    ValidateGC(pDraw, pGC);
-
-    (*pGC->ops->PolyFillRect) (pDraw, pGC, RegionNumRects(pRgn), rects);
-
-    FreeScratchGC(pGC);
- bail1:
-    free(rects);
- bail0:
-    ;
-}
diff --git a/hw/kdrive/src/kxv.h b/hw/kdrive/src/kxv.h
index 451d3fa..190b326 100644
--- a/hw/kdrive/src/kxv.h
+++ b/hw/kdrive/src/kxv.h
@@ -170,9 +170,6 @@ KdXVCopyPlanarData(KdScreenInfo * screen, CARD8 *src, CARD8 *dst, int randr,
                    int srcH, int height, int top, int left, int h, int w,
                    int id);
 
-void
- KXVPaintRegion(DrawablePtr pDraw, RegionPtr pRgn, Pixel fg);
-
 KdVideoAdaptorPtr KdXVAllocateVideoAdaptorRec(KdScreenInfo * screen);
 
 void KdXVFreeVideoAdaptorRec(KdVideoAdaptorPtr ptr);
-- 
2.0.1



More information about the xorg-devel mailing list