[cairo-commit] glitz/src glitz_agl_surface.c, 1.2, 1.3 glitz_glx_surface.c, 1.2, 1.3 glitz_program.c, 1.1.1.1, 1.2 glitz_programmatic.c, 1.1.1.1, 1.2

David Reveman commit at pdx.freedesktop.org
Sat Apr 24 15:10:24 PDT 2004


Committed by: davidr

Update of /cvs/cairo/glitz/src
In directory pdx:/tmp/cvs-serv17428/src

Modified Files:
	glitz_agl_surface.c glitz_glx_surface.c glitz_program.c 
	glitz_programmatic.c 
Log Message:
Fixed surface initialization bug

Index: glitz_agl_surface.c
===================================================================
RCS file: /cvs/cairo/glitz/src/glitz_agl_surface.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** a/glitz_agl_surface.c	3 Apr 2004 17:53:54 -0000	1.2
--- b/glitz_agl_surface.c	24 Apr 2004 22:10:22 -0000	1.3
***************
*** 70,74 ****
    }
  
!   return 0;
  }
  
--- 70,77 ----
    }
  
!   if (constraint == GLITZ_CN_SURFACE_DRAWABLE_CURRENT)
!     return 0;
!   else
!     return 1;
  }
  

Index: glitz_glx_surface.c
===================================================================
RCS file: /cvs/cairo/glitz/src/glitz_glx_surface.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** a/glitz_glx_surface.c	3 Apr 2004 17:53:54 -0000	1.2
--- b/glitz_glx_surface.c	24 Apr 2004 22:10:22 -0000	1.3
***************
*** 67,71 ****
    }
  
!   return 0;
  }
  
--- 67,74 ----
    }
  
!   if (constraint == GLITZ_CN_SURFACE_DRAWABLE_CURRENT)
!     return 0;
!   else
!     return 1;
  }
  

Index: glitz_program.c
===================================================================
RCS file: /cvs/cairo/glitz/src/glitz_program.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** a/glitz_program.c	30 Mar 2004 17:07:19 -0000	1.1.1.1
--- b/glitz_program.c	24 Apr 2004 22:10:22 -0000	1.2
***************
*** 264,271 ****
     *
     * program.local[0].x = start offset
!    * program.local[0].y = stop offset
!    * program.local[0].z = 1 / length
!    * program.local[1].x = sin (angle)
!    * program.local[1].y = cos (angle)
     *
     * Author: David Reveman <c99drn at cs.umu.se>
--- 264,270 ----
     *
     * program.local[0].x = start offset
!    * program.local[0].y = 1 / length
!    * program.local[0].z = sin (angle)
!    * program.local[0].w = cos (angle)
     *
     * Author: David Reveman <c99drn at cs.umu.se>
***************
*** 274,278 ****
    "!!ARBfp1.0\n"
    "PARAM gradient = program.local[0];\n"
-   "PARAM angle = program.local[1];\n"
    "ATTRIB pos = fragment.texcoord[%d];\n"
    "TEMP color, distance, position;\n"
--- 273,276 ----
***************
*** 281,289 ****
    "%s"
    
!   "MUL position.x, angle.x, pos.x;\n"
!   "MAD position.x, angle.y, pos.y, position.x;\n"
    
    "SUB distance.x, position.x, gradient.x;\n"
!   "MUL distance.x, distance.x, gradient.z;\n"
    
    "TEX color, distance, texture[2], 1D;\n"
--- 279,287 ----
    "%s"
    
!   "MUL position.x, gradient.z, pos.x;\n"
!   "MAD position.x, gradient.w, pos.y, position.x;\n"
    
    "SUB distance.x, position.x, gradient.x;\n"
!   "MUL distance.x, distance.x, gradient.y;\n"
    
    "TEX color, distance, texture[2], 1D;\n"

Index: glitz_programmatic.c
===================================================================
RCS file: /cvs/cairo/glitz/src/glitz_programmatic.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** a/glitz_programmatic.c	30 Mar 2004 17:07:19 -0000	1.1.1.1
--- b/glitz_programmatic.c	24 Apr 2004 22:10:22 -0000	1.2
***************
*** 214,218 ****
    case GLITZ_PROGRAMMATIC_SURFACE_LINEAR_TYPE: {
      glitz_point_t p1, p2;
!     double length, angle, start, stop;
      
      p1.x = FIXED_TO_DOUBLE (surface->u.linear.start.x);
--- 214,218 ----
    case GLITZ_PROGRAMMATIC_SURFACE_LINEAR_TYPE: {
      glitz_point_t p1, p2;
!     double length, angle, start;
      
      p1.x = FIXED_TO_DOUBLE (surface->u.linear.start.x);
***************
*** 232,247 ****
      start += -sin (angle) * p1.y;
  
-     stop = cos (angle) * p2.x;
-     stop += -sin (angle) * p2.y;
- 
      gl->program_local_param_4d_arb (GLITZ_GL_FRAGMENT_PROGRAM_ARB, 0,
                                      start,
-                                     stop,
                                      (length)? 1.0 / length: INT_MAX,
-                                     0.0);
-     gl->program_local_param_4d_arb (GLITZ_GL_FRAGMENT_PROGRAM_ARB, 1,
                                      cos (angle),
!                                     -sin (angle),
!                                     0.0, 0.0);
  
      gl->active_texture_arb (GLITZ_GL_TEXTURE2_ARB);
--- 232,240 ----
      start += -sin (angle) * p1.y;
  
      gl->program_local_param_4d_arb (GLITZ_GL_FRAGMENT_PROGRAM_ARB, 0,
                                      start,
                                      (length)? 1.0 / length: INT_MAX,
                                      cos (angle),
!                                     -sin (angle));
  
      gl->active_texture_arb (GLITZ_GL_TEXTURE2_ARB);





More information about the cairo-commit mailing list