xf86-video-intel: 2 commits - src/sna/sna_accel.c

Chris Wilson ickle at kemper.freedesktop.org
Fri Jun 15 03:16:31 PDT 2012


 src/sna/sna_accel.c |   21 ++++++++++++---------
 1 file changed, 12 insertions(+), 9 deletions(-)

New commits:
commit bfd88d5429528b0162eafcc9496bfd1c708b60cd
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Fri Jun 15 11:21:29 2012 +0100

    sna: Silence a few compiler warnings
    
    Nothing harmful, just noise.
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index ab451f9..bc85643 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -1917,7 +1917,7 @@ sna_pixmap_move_area_to_gpu(PixmapPtr pixmap, const BoxRec *box, unsigned int fl
 	if (MIGRATE_ALL || region_subsumes_damage(&r, priv->cpu_damage)) {
 		int n;
 
-		n = sna_damage_get_boxes(priv->cpu_damage, &box);
+		n = sna_damage_get_boxes(priv->cpu_damage, (BoxPtr *)&box);
 		if (n) {
 			Bool ok = FALSE;
 
@@ -8781,7 +8781,7 @@ sna_poly_fill_polygon(DrawablePtr draw, GCPtr gc,
 	      (gc->fillStyle == FillTiled && gc->tileIsPixel)),
 	     gc->fillStyle, gc->tileIsPixel,
 	     gc->alu));
-	DBG(("%s: draw=%d, offset=(%d, %d), size=%dx%d\n",
+	DBG(("%s: draw=%ld, offset=(%d, %d), size=%dx%d\n",
 	     __FUNCTION__, draw->serialNumber,
 	     draw->x, draw->y, draw->width, draw->height));
 
@@ -11875,7 +11875,7 @@ static GCOps sna_gc_ops__tmp = {
 static void
 sna_validate_gc(GCPtr gc, unsigned long changes, DrawablePtr drawable)
 {
-	DBG(("%s changes=%x\n", __FUNCTION__, changes));
+	DBG(("%s changes=%lx\n", __FUNCTION__, changes));
 
 	if (changes & (GCClipMask|GCSubwindowMode) ||
 	    drawable->serialNumber != (gc->serialNumber & DRAWABLE_SERIAL_BITS) ||
@@ -12195,7 +12195,7 @@ static CARD32 sna_timeout(OsTimerPtr timer, CARD32 now, pointer arg)
 	int i;
 
 	DBG(("%s: now=%d, active=%08x, ready=%08x\n",
-	     __FUNCTION__, now, sna->timer_active, sna->timer_ready));
+	     __FUNCTION__, (int)now, sna->timer_active, sna->timer_ready));
 	active = sna->timer_active & ~sna->timer_ready;
 	if (active == 0)
 		return 0;
commit b3659beec8c4126de5da4df5cb2cc077b7af6c0b
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Fri Jun 15 11:08:18 2012 +0100

    sna: Check for zero-sized damage regions after trimming Windows to their pixmaps
    
    Reported-by: Zdenek Kabelac <zkabelac at redhat.com>
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index 982f562..ab451f9 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -1736,6 +1736,11 @@ out:
 	return true;
 }
 
+static inline bool box_empty(const BoxRec *box)
+{
+	return box->x2 <= box->x1 || box->y2 <= box->y1;
+}
+
 bool
 sna_drawable_move_to_cpu(DrawablePtr drawable, unsigned flags)
 {
@@ -1770,6 +1775,9 @@ sna_drawable_move_to_cpu(DrawablePtr drawable, unsigned flags)
 	if (region.extents.y2 > pixmap->drawable.height)
 		region.extents.y2 = pixmap->drawable.height;
 
+	if (box_empty(&region.extents))
+		return true;
+
 	return sna_drawable_move_region_to_cpu(&pixmap->drawable, &region, flags);
 }
 
@@ -2714,11 +2722,6 @@ static inline void box32_add_rect(Box32Rec *box, const xRectangle *r)
 		box->y2 = v;
 }
 
-static inline bool box_empty(const BoxRec *box)
-{
-	return box->x2 <= box->x1 || box->y2 <= box->y1;
-}
-
 static Bool
 sna_put_image_upload_blt(DrawablePtr drawable, GCPtr gc, RegionPtr region,
 			 int x, int y, int w, int h, char *bits, int stride)


More information about the xorg-commit mailing list