Get rid of toplevel argument to implementation constructors.
authorSøren Sandmann Pedersen <sandmann@redhat.com>
Tue, 2 Jun 2009 20:51:28 +0000 (16:51 -0400)
committerSøren Sandmann Pedersen <sandmann@redhat.com>
Tue, 2 Jun 2009 20:51:28 +0000 (16:51 -0400)
It was always NULL anyway.

pixman/pixman-arm-neon.c
pixman/pixman-arm-simd.c
pixman/pixman-cpu.c
pixman/pixman-fast-path.c
pixman/pixman-general.c
pixman/pixman-implementation.c
pixman/pixman-mmx.c
pixman/pixman-private.h
pixman/pixman-sse2.c
pixman/pixman-vmx.c

index 5453dbb..39b7f53 100644 (file)
@@ -1537,10 +1537,10 @@ arm_neon_fill (pixman_implementation_t *imp,
 }
 
 pixman_implementation_t *
-_pixman_implementation_create_arm_neon (pixman_implementation_t *toplevel)
+_pixman_implementation_create_arm_neon (void)
 {
-       pixman_implementation_t *simd = _pixman_implementation_create_arm_simd (NULL);
-       pixman_implementation_t *imp  = _pixman_implementation_create (toplevel, simd);
+       pixman_implementation_t *simd = _pixman_implementation_create_arm_simd();
+       pixman_implementation_t *imp  = _pixman_implementation_create (simd);
 
        imp->composite = arm_neon_composite;
 //     imp->blt = arm_neon_blt;
index 42503fc..951f847 100644 (file)
@@ -471,10 +471,10 @@ arm_simd_composite (pixman_implementation_t *imp,
 }
 
 pixman_implementation_t *
-_pixman_implementation_create_arm_simd (pixman_implementation_t *toplevel)
+_pixman_implementation_create_arm_simd (void)
 {
-    pixman_implementation_t *general = _pixman_implementation_create_fast_path (NULL);
-    pixman_implementation_t *imp = _pixman_implementation_create (toplevel, general);
+    pixman_implementation_t *general = _pixman_implementation_create_fast_path ();
+    pixman_implementation_t *imp = _pixman_implementation_create (general);
 
     imp->composite = arm_simd_composite;
 
index 057c134..c569f0b 100644 (file)
@@ -510,25 +510,25 @@ _pixman_choose_implementation (void)
 {
 #ifdef USE_SSE2
     if (pixman_have_sse2 ())
-       return _pixman_implementation_create_sse2 (NULL);
+       return _pixman_implementation_create_sse2 ();
 #endif
 #ifdef USE_MMX
     if (pixman_have_mmx())
-       return _pixman_implementation_create_mmx (NULL);
+       return _pixman_implementation_create_mmx ();
 #endif
 
 #ifdef USE_ARM_NEON
     if (pixman_have_arm_neon())
-       return _pixman_implementation_create_arm_neon (NULL);
+       return _pixman_implementation_create_arm_neon ();
 #endif
 #ifdef USE_ARM_SIMD
     if (pixman_have_arm_simd())
-       return _pixman_implementation_create_arm_simd (NULL);
+       return _pixman_implementation_create_arm_simd ();
 #endif
 #ifdef USE_VMX
     if (pixman_have_vmx())
-       return _pixman_implementation_create_vmx (NULL);
+       return _pixman_implementation_create_vmx ();
 #endif
     
-    return _pixman_implementation_create_fast_path (NULL);
+    return _pixman_implementation_create_fast_path ();
 }
index 5f78bc3..65a291f 100644 (file)
@@ -1338,10 +1338,10 @@ fast_path_fill (pixman_implementation_t *imp,
 }
 
 pixman_implementation_t *
-_pixman_implementation_create_fast_path (pixman_implementation_t *toplevel)
+_pixman_implementation_create_fast_path (void)
 {
-    pixman_implementation_t *general = _pixman_implementation_create_general (NULL);
-    pixman_implementation_t *imp = _pixman_implementation_create (toplevel, general);
+    pixman_implementation_t *general = _pixman_implementation_create_general ();
+    pixman_implementation_t *imp = _pixman_implementation_create (general);
 
     imp->composite = fast_path_composite;
     imp->fill = fast_path_fill;
index ed858fe..be512d5 100644 (file)
@@ -344,9 +344,9 @@ general_fill (pixman_implementation_t *imp,
 }
 
 pixman_implementation_t *
-_pixman_implementation_create_general (pixman_implementation_t *toplevel)
+_pixman_implementation_create_general (void)
 {
-    pixman_implementation_t *imp = _pixman_implementation_create (toplevel, NULL);
+    pixman_implementation_t *imp = _pixman_implementation_create (NULL);
 
     _pixman_setup_combiner_functions_32 (imp);
     _pixman_setup_combiner_functions_64 (imp);
index e57b3d9..e0a4afd 100644 (file)
@@ -132,8 +132,7 @@ delegate_fill (pixman_implementation_t *imp,
 }
 
 pixman_implementation_t *
-_pixman_implementation_create (pixman_implementation_t *toplevel,
-                              pixman_implementation_t *delegate)
+_pixman_implementation_create (pixman_implementation_t *delegate)
 {
     pixman_implementation_t *imp = malloc (sizeof (pixman_implementation_t));
     pixman_implementation_t *d;
@@ -141,18 +140,12 @@ _pixman_implementation_create (pixman_implementation_t *toplevel,
     
     if (!imp)
        return NULL;
-    
-    if (toplevel)
-       imp->toplevel = toplevel;
-    else
-       imp->toplevel = imp;
 
     /* Make sure the whole delegate chain has the right toplevel */
-    for (d = delegate; d != NULL; d = d->delegate)
-       d->toplevel = imp->toplevel;
-    
     imp->delegate = delegate;
-    
+    for (d = imp; d != NULL; d = d->delegate)
+       d->toplevel = imp;
+
     /* Fill out function pointers with ones that just delegate
      */
     imp->composite = delegate_composite;
index db87b19..26275d6 100644 (file)
@@ -3172,10 +3172,10 @@ mmx_fill (pixman_implementation_t *imp,
 }
 
 pixman_implementation_t *
-_pixman_implementation_create_mmx (pixman_implementation_t *toplevel)
+_pixman_implementation_create_mmx (void)
 {
-    pixman_implementation_t *general = _pixman_implementation_create_fast_path (NULL);
-    pixman_implementation_t *imp = _pixman_implementation_create (toplevel, general);
+    pixman_implementation_t *general = _pixman_implementation_create_fast_path ();
+    pixman_implementation_t *imp = _pixman_implementation_create (general);
 
     imp->combine_32[PIXMAN_OP_OVER] = mmxCombineOverU;
     imp->combine_32[PIXMAN_OP_OVER_REVERSE] = mmxCombineOverReverseU;
index 9e770f6..7da862d 100644 (file)
@@ -962,8 +962,7 @@ struct pixman_implementation_t
 };
 
 pixman_implementation_t *
-_pixman_implementation_create (pixman_implementation_t *toplevel,
-                              pixman_implementation_t *delegate);
+_pixman_implementation_create (pixman_implementation_t *delegate);
 
 void
 _pixman_implementation_combine_32 (pixman_implementation_t *   imp,
@@ -1035,28 +1034,28 @@ _pixman_implementation_fill (pixman_implementation_t *   imp,
     
 /* Specific implementations */
 pixman_implementation_t *
-_pixman_implementation_create_general (pixman_implementation_t *toplevel);
+_pixman_implementation_create_general (void);
 pixman_implementation_t *
-_pixman_implementation_create_fast_path (pixman_implementation_t *toplevel);
+_pixman_implementation_create_fast_path (void);
 #ifdef USE_MMX
 pixman_implementation_t *
-_pixman_implementation_create_mmx (pixman_implementation_t *toplevel);
+_pixman_implementation_create_mmx (void);
 #endif
 #ifdef USE_SSE2
 pixman_implementation_t *
-_pixman_implementation_create_sse2 (pixman_implementation_t *toplevel);
+_pixman_implementation_create_sse2 (void);
 #endif
 #ifdef USE_ARM_SIMD
 pixman_implementation_t *
-_pixman_implementation_create_arm_simd (pixman_implementation_t *toplevel);
+_pixman_implementation_create_arm_simd (void);
 #endif
 #ifdef USE_ARM_NEON
 pixman_implementation_t *
-_pixman_implementation_create_arm_neon (pixman_implementation_t *toplevel);
+_pixman_implementation_create_arm_neon (void);
 #endif
 #ifdef USE_VMX
 pixman_implementation_t *
-_pixman_implementation_create_vmx (pixman_implementation_t *toplevel);
+_pixman_implementation_create_vmx (void);
 #endif
 
 pixman_bool_t
index 40e2228..8b48b2e 100644 (file)
@@ -5044,10 +5044,10 @@ sse2_fill (pixman_implementation_t *imp,
 }
 
 pixman_implementation_t *
-_pixman_implementation_create_sse2 (pixman_implementation_t *toplevel)
+_pixman_implementation_create_sse2 (void)
 {
-    pixman_implementation_t *mmx = _pixman_implementation_create_mmx (NULL);
-    pixman_implementation_t *imp = _pixman_implementation_create (toplevel, mmx);
+    pixman_implementation_t *mmx = _pixman_implementation_create_mmx ();
+    pixman_implementation_t *imp = _pixman_implementation_create (mmx);
 
     /* SSE2 constants */
     Mask565r  = createMask_2x32_128 (0x00f80000, 0x00f80000);
index e371f7f..ea4821d 100644 (file)
@@ -1558,10 +1558,10 @@ const FastPathInfo *const vmx_fast_paths = vmx_fast_path_array;
 #endif
 
 pixman_implementation_t *
-_pixman_implementation_create_vmx (pixman_implementation_t *toplevel)
+_pixman_implementation_create_vmx (void)
 {
-    pixman_implementation_t *fast = _pixman_implementation_create_fast_path (NULL);
-    pixman_implementation_t *imp = _pixman_implementation_create (toplevel, fast);
+    pixman_implementation_t *fast = _pixman_implementation_create_fast_path ();
+    pixman_implementation_t *imp = _pixman_implementation_create (fast);
 
     /* Set up function pointers */