Re: [LIBART] Patch for 'full-span' redraw issues



On Wed, Sep 12, 2001 at 04:57:28PM +0100, James Turner wrote:
> The attached patch fixes a bug in the art_render_ code when a SVP spans 
> an entire row of the render area; the row callbacks in art_rgb_svp.c 
> have additional logic in the (n_steps == 0) case to fill the row if 
> required.

This patch dont aply to me.

Attached there is a new patch that aply correctly to the cvs version
and that contain some cosmetic modifies, conform to the style used in 
the other files of libart.

Ciao
-- 
Daniele
		    --- http://www.grinta.net ---
Index: art_render_svp.c
===================================================================
RCS file: /cvs/gnome/libart_lgpl/art_render_svp.c,v
retrieving revision 1.2
diff -u -r1.2 art_render_svp.c
--- art_render_svp.c	2000/05/29 21:58:00	1.2
+++ art_render_svp.c	2001/09/13 14:23:04
@@ -105,6 +105,18 @@
 	  run[n_run].alpha = 0x8000;
 	  n_run++;
 	}
+    } 
+  else
+    {      
+      if (running_sum > 0x80ff)
+	{
+	  run[0].x = x0;
+	  run[0].alpha = running_sum;
+	  
+	  run[1].x = x1;
+	  run[1].alpha = 0x8000;
+	  n_run = 2;
+	}
     }
 
   render->n_run = n_run;
@@ -172,6 +184,22 @@
 	  n_run++;
 	  span_x[n_span++] = x1;
 	}
+    } 
+  else
+    {
+      if (running_sum > 0x80ff)
+	{
+	  run[0].x = x0;
+	  run[0].alpha = running_sum;
+	  
+	  run[1].x = x1;
+	  run[1].alpha = 0x8000;
+	  n_run = 2;
+	  
+	  span_x[0] = x0;
+	  span_x[1] = x1;
+	  n_span = 2;
+	}
     }
 
   render->n_run = n_run;
@@ -238,6 +266,20 @@
 	  run[n_run].alpha = 0x8000;
 	  n_run++;
 	}
+    } 
+  else
+    {
+      alpha = (running_sum >> 16) & 0xff;
+      if (alpha) 
+	{
+	  run[0].x = x0;
+	  alpha = ((running_sum >> 8) * opacity + 0x80080) >> 8;
+	  run[0].alpha = alpha;
+	  
+	  run[1].x = x1;
+	  run[1].alpha = 0x8000;
+	  n_run = 2;
+	}
     }
 
   render->n_run = n_run;
@@ -311,6 +353,24 @@
 	  run[n_run].alpha = 0x8000;
 	  n_run++;
 	  span_x[n_span++] = x1;
+	}
+    } 
+  else
+    {
+      alpha = (running_sum >> 16) & 0xff;
+      if (alpha)
+	{
+	  run[0].x = x0;
+	  alpha = ((running_sum >> 8) * opacity + 0x80080) >> 8;
+	  run[0].alpha = alpha;
+	  
+	  run[1].x = x1;
+	  run[1].alpha = 0x8000;
+	  n_run = 2;
+	  
+	  span_x[0] = x0;
+	  span_x[1] = x1;
+	  n_span = 2;
 	}
     }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]