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

rpms/xorg-x11-server/devel xorg-x11-server-1.1.0-tfp-damage.patch, 1.2, 1.3



Author: krh

Update of /cvs/dist/rpms/xorg-x11-server/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv26900

Modified Files:
	xorg-x11-server-1.1.0-tfp-damage.patch 
Log Message:
Update xorg-x11-server-1.1.0-tfp-damage.patch to only fill alpha channel
for damaged region.

xorg-x11-server-1.1.0-tfp-damage.patch:
 glxcmds.c     |    1 
 glxdrawable.h |    4 +
 glxdri.c      |  142 ++++++++++++++++++++++++++++++++++++++++------------------
 glxext.c      |    4 +
 4 files changed, 108 insertions(+), 43 deletions(-)

Index: xorg-x11-server-1.1.0-tfp-damage.patch
===================================================================
RCS file: /cvs/dist/rpms/xorg-x11-server/devel/xorg-x11-server-1.1.0-tfp-damage.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- xorg-x11-server-1.1.0-tfp-damage.patch	21 Jun 2006 00:12:03 -0000	1.2
+++ xorg-x11-server-1.1.0-tfp-damage.patch	21 Jun 2006 05:23:41 -0000	1.3
@@ -1,5 +1,5 @@
 --- ./GL/glx/glxdrawable.h.tfp-damage	2006-03-11 19:11:33.000000000 -0500
-+++ ./GL/glx/glxdrawable.h	2006-06-19 20:12:48.000000000 -0400
++++ ./GL/glx/glxdrawable.h	2006-06-20 20:33:53.000000000 -0400
 @@ -41,6 +41,8 @@
  **
  */
@@ -19,7 +19,7 @@
  
  struct __GLXdrawable {
 --- ./GL/glx/glxcmds.c.tfp-damage	2006-05-09 13:44:26.000000000 -0400
-+++ ./GL/glx/glxcmds.c	2006-06-19 20:12:48.000000000 -0400
++++ ./GL/glx/glxcmds.c	2006-06-20 20:33:53.000000000 -0400
 @@ -1271,6 +1271,7 @@
      pGlxPixmap->pGlxScreen = pGlxScreen;
      pGlxPixmap->pScreen = pScreen;
@@ -29,8 +29,41 @@
  
      pGlxPixmap->modes = modes;
 --- ./GL/glx/glxdri.c.tfp-damage	2006-04-02 21:25:21.000000000 -0400
-+++ ./GL/glx/glxdri.c	2006-06-20 20:09:20.000000000 -0400
-@@ -326,7 +326,6 @@
++++ ./GL/glx/glxdri.c	2006-06-21 00:39:40.000000000 -0400
+@@ -296,24 +296,18 @@
+ }
+ 
+ static void
+-glxFillAlphaChannel (PixmapPtr pixmap)
++glxFillAlphaChannel (PixmapPtr pixmap, int x, int y, int width, int height)
+ {
+-    int i, j;
+-    CARD32 *pixels = (CARD32 *)pixmap->devPrivate.ptr;
++    int i;
++    CARD32 *p, *end, *pixels = (CARD32 *)pixmap->devPrivate.ptr;
+     CARD32 rowstride = pixmap->devKind / 4;
+-    CARD32 x, y;
+-
+-    x = pixmap->drawable.x;
+-    y = pixmap->drawable.y;
+     
+-    for (i = y; i < pixmap->drawable.height + y; ++i)
++    for (i = y; i < y + height; i++)
+     {
+-        for (j = x; j < pixmap->drawable.width + x; ++j)
+-        {
+-            int index = i * rowstride + j;
+-
+-            pixels[index] |= 0xFF000000;
+-        }
++	p = &pixels[i * rowstride + x];
++	end = p + width;
++	while (p < end)
++	  *p++ |= 0xFF000000;
+     }
+ }
+ 
+@@ -326,7 +320,6 @@
   * - No fbconfig handling for TEXTURE_TARGET
   * - No fbconfig exposure of Y inversion state
   * - No GenerateMipmapEXT support (due to no FBO support)
@@ -38,7 +71,7 @@
   * - No support for anything but 16bpp and 32bpp-sparse pixmaps
   */
  
-@@ -335,38 +334,92 @@
+@@ -335,38 +328,103 @@
  		     int buffer,
  		     __GLXpixmap *glxPixmap)
  {
@@ -51,12 +84,6 @@
      pixmap = (PixmapPtr) glxPixmap->pDraw;
 -    bpp = pixmap->drawable.depth >= 24 ? 4 : 2; /* XXX 24bpp packed, 8, etc */
 -    
--    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH,
--                                       pixmap->devKind / bpp) );
--    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS,
--                                       pixmap->drawable.y) );
--    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS,
--                                       pixmap->drawable.x) );
 +    if (!glxPixmap->pDamage) {
 +        glxPixmap->pDamage = DamageCreate(NULL, NULL, DamageReportNone,
 +					  TRUE, glxPixmap->pScreen, NULL);
@@ -81,10 +108,25 @@
 +	format = GL_RGB;
 +	type = GL_UNSIGNED_SHORT_5_6_5;
 +    }
- 
-     if (pixmap->drawable.depth == 24)
-         glxFillAlphaChannel(pixmap);
- 
++
++    if (!(glxCountBits(pixmap->drawable.width) == 1 &&
++	  glxCountBits(pixmap->drawable.height) == 1)
++	/* || strstr(CALL_GetString(GL_EXTENSIONS,
++	             "GL_ARB_texture_non_power_of_two")) */)
++	target = GL_TEXTURE_RECTANGLE_ARB;
++    else
++	target = GL_TEXTURE_2D;
++
+     CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH,
+-                                       pixmap->devKind / bpp) );
+-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS,
+-                                       pixmap->drawable.y) );
+-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS,
+-                                       pixmap->drawable.x) );
+-
+-    if (pixmap->drawable.depth == 24)
+-        glxFillAlphaChannel(pixmap);
+-
 -    npot = !(glxCountBits(pixmap->drawable.width) == 1 &&
 -             glxCountBits(pixmap->drawable.height) == 1) /* ||
 -             strstr(CALL_GetString(GL_EXTENSIONS,
@@ -100,18 +142,16 @@
 -		       bpp == 4 ? GL_BGRA : GL_RGB,
 -		       bpp == 4 ? GL_UNSIGNED_BYTE : GL_UNSIGNED_SHORT_5_6_5,
 -		       pixmap->devPrivate.ptr ) );
-+    if (!(glxCountBits(pixmap->drawable.width) == 1 &&
-+	  glxCountBits(pixmap->drawable.height) == 1)
-+	/* || strstr(CALL_GetString(GL_EXTENSIONS,
-+	             "GL_ARB_texture_non_power_of_two")) */)
-+	target = GL_TEXTURE_RECTANGLE_ARB;
-+    else
-+	target = GL_TEXTURE_2D;
-+
-+    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH,
 +				       pixmap->devKind / bpp) );
 +    if (pRegion == NULL)
 +    {
++	if (pixmap->drawable.depth == 24)
++	    glxFillAlphaChannel(pixmap,
++				pixmap->drawable.x,
++				pixmap->drawable.y,
++				pixmap->drawable.width,
++				pixmap->drawable.height);
++
 +        CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS,
 +					   pixmap->drawable.x) );
 +	CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS,
@@ -135,6 +175,13 @@
 +	p = REGION_RECTS (pRegion);
 +	for (i = 0; i < numRects; i++)
 +	{
++	    if (pixmap->drawable.depth == 24)
++		glxFillAlphaChannel(pixmap,
++				    pixmap->drawable.x + p[i].x1,
++				    pixmap->drawable.y + p[i].y1,
++				    p[i].x2 - p[i].x1,
++				    p[i].y2 - p[i].y1);
++
 +	    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS,
 +					       pixmap->drawable.x + p[i].x1) );
 +	    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS,
@@ -156,7 +203,7 @@
      return Success;
  }
 --- ./GL/glx/glxext.c.tfp-damage	2006-03-16 20:47:25.000000000 -0500
-+++ ./GL/glx/glxext.c	2006-06-19 20:12:48.000000000 -0400
++++ ./GL/glx/glxext.c	2006-06-20 20:33:53.000000000 -0400
 @@ -141,6 +141,10 @@
  
      pGlxPixmap->idExists = False;


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