summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea Canciani <ranma42@gmail.com>2010-08-25 18:57:36 +0200
committerAndrea Canciani <ranma42@gmail.com>2010-08-25 18:57:36 +0200
commit797e2a376a3e092157b79af21e877ed9fde7dae3 (patch)
treee4400a6ebbba4281e6a050caa6704f80a346e078
parenta8ea889e5e3029c2aad0e54e849783242daca274 (diff)
make implementations staticwip/valgrind2
-rw-r--r--pixman/pixman-arm-neon.c3
-rw-r--r--pixman/pixman-arm-simd.c3
-rw-r--r--pixman/pixman-fast-path.c3
-rw-r--r--pixman/pixman-general.c3
-rw-r--r--pixman/pixman-implementation.c4
-rw-r--r--pixman/pixman-mmx.c3
-rw-r--r--pixman/pixman-private.h3
-rw-r--r--pixman/pixman-sse2.c3
-rw-r--r--pixman/pixman-vmx.c3
9 files changed, 18 insertions, 10 deletions
diff --git a/pixman/pixman-arm-neon.c b/pixman/pixman-arm-neon.c
index 1f2430c..df7166f 100644
--- a/pixman/pixman-arm-neon.c
+++ b/pixman/pixman-arm-neon.c
@@ -339,9 +339,10 @@ BIND_COMBINE_U (out_reverse)
pixman_implementation_t *
_pixman_implementation_create_arm_neon (void)
{
+ static pixman_implementation_t arm_neon_imp;
pixman_implementation_t *general = _pixman_implementation_create_fast_path ();
pixman_implementation_t *imp =
- _pixman_implementation_create (general, arm_neon_fast_paths);
+ _pixman_implementation_create (&arm_neon_imp, general, arm_neon_fast_paths);
imp->combine_32[PIXMAN_OP_OVER] = neon_combine_over_u;
imp->combine_32[PIXMAN_OP_ADD] = neon_combine_add_u;
diff --git a/pixman/pixman-arm-simd.c b/pixman/pixman-arm-simd.c
index 389c9e0..40a0348 100644
--- a/pixman/pixman-arm-simd.c
+++ b/pixman/pixman-arm-simd.c
@@ -410,8 +410,9 @@ static const pixman_fast_path_t arm_simd_fast_paths[] =
pixman_implementation_t *
_pixman_implementation_create_arm_simd (void)
{
+ static pixman_implementation_t arm_simd_imp;
pixman_implementation_t *general = _pixman_implementation_create_fast_path ();
- pixman_implementation_t *imp = _pixman_implementation_create (general, arm_simd_fast_paths);
+ pixman_implementation_t *imp = _pixman_implementation_create (&arm_simd_imp, general, arm_simd_fast_paths);
return imp;
}
diff --git a/pixman/pixman-fast-path.c b/pixman/pixman-fast-path.c
index f03752f..73c4871 100644
--- a/pixman/pixman-fast-path.c
+++ b/pixman/pixman-fast-path.c
@@ -2044,8 +2044,9 @@ fast_path_fill (pixman_implementation_t *imp,
pixman_implementation_t *
_pixman_implementation_create_fast_path (void)
{
+ static pixman_implementation_t fast_path_imp;
pixman_implementation_t *general = _pixman_implementation_create_general ();
- pixman_implementation_t *imp = _pixman_implementation_create (general, c_fast_paths);
+ pixman_implementation_t *imp = _pixman_implementation_create (&fast_path_imp, general, c_fast_paths);
imp->fill = fast_path_fill;
diff --git a/pixman/pixman-general.c b/pixman/pixman-general.c
index fc742c0..f9e5789 100644
--- a/pixman/pixman-general.c
+++ b/pixman/pixman-general.c
@@ -306,7 +306,8 @@ general_fill (pixman_implementation_t *imp,
pixman_implementation_t *
_pixman_implementation_create_general (void)
{
- pixman_implementation_t *imp = _pixman_implementation_create (NULL, general_fast_path);
+ static pixman_implementation_t general_imp;
+ pixman_implementation_t *imp = _pixman_implementation_create (&general_imp, NULL, general_fast_path);
_pixman_setup_combiner_functions_32 (imp);
_pixman_setup_combiner_functions_64 (imp);
diff --git a/pixman/pixman-implementation.c b/pixman/pixman-implementation.c
index bc3749e..fa5d066 100644
--- a/pixman/pixman-implementation.c
+++ b/pixman/pixman-implementation.c
@@ -112,10 +112,10 @@ delegate_fill (pixman_implementation_t *imp,
}
pixman_implementation_t *
-_pixman_implementation_create (pixman_implementation_t *delegate,
+_pixman_implementation_create (pixman_implementation_t *imp,
+ pixman_implementation_t *delegate,
const pixman_fast_path_t *fast_paths)
{
- pixman_implementation_t *imp = malloc (sizeof (pixman_implementation_t));
pixman_implementation_t *d;
int i;
diff --git a/pixman/pixman-mmx.c b/pixman/pixman-mmx.c
index d51b40c..c694130 100644
--- a/pixman/pixman-mmx.c
+++ b/pixman/pixman-mmx.c
@@ -3342,8 +3342,9 @@ mmx_fill (pixman_implementation_t *imp,
pixman_implementation_t *
_pixman_implementation_create_mmx (void)
{
+ static pixman_implementation_t mmx_imp;
pixman_implementation_t *general = _pixman_implementation_create_fast_path ();
- pixman_implementation_t *imp = _pixman_implementation_create (general, mmx_fast_paths);
+ pixman_implementation_t *imp = _pixman_implementation_create (&mmx_imp, general, mmx_fast_paths);
imp->combine_32[PIXMAN_OP_OVER] = mmx_combine_over_u;
imp->combine_32[PIXMAN_OP_OVER_REVERSE] = mmx_combine_over_reverse_u;
diff --git a/pixman/pixman-private.h b/pixman/pixman-private.h
index dedea0b..6f2875f 100644
--- a/pixman/pixman-private.h
+++ b/pixman/pixman-private.h
@@ -437,7 +437,8 @@ struct pixman_implementation_t
};
pixman_implementation_t *
-_pixman_implementation_create (pixman_implementation_t *delegate,
+_pixman_implementation_create (pixman_implementation_t *imp,
+ pixman_implementation_t *delegate,
const pixman_fast_path_t *fast_paths);
void
diff --git a/pixman/pixman-sse2.c b/pixman/pixman-sse2.c
index 3dd7967..02de910 100644
--- a/pixman/pixman-sse2.c
+++ b/pixman/pixman-sse2.c
@@ -6490,12 +6490,13 @@ __attribute__((__force_align_arg_pointer__))
pixman_implementation_t *
_pixman_implementation_create_sse2 (void)
{
+ static pixman_implementation_t sse2_imp;
#ifdef USE_MMX
pixman_implementation_t *fallback = _pixman_implementation_create_mmx ();
#else
pixman_implementation_t *fallback = _pixman_implementation_create_fast_path ();
#endif
- pixman_implementation_t *imp = _pixman_implementation_create (fallback, sse2_fast_paths);
+ pixman_implementation_t *imp = _pixman_implementation_create (&sse2_imp, fallback, sse2_fast_paths);
/* SSE2 constants */
mask_565_r = create_mask_2x32_128 (0x00f80000, 0x00f80000);
diff --git a/pixman/pixman-vmx.c b/pixman/pixman-vmx.c
index e811cf7..2052781 100644
--- a/pixman/pixman-vmx.c
+++ b/pixman/pixman-vmx.c
@@ -1615,8 +1615,9 @@ static const pixman_fast_path_t vmx_fast_paths[] =
pixman_implementation_t *
_pixman_implementation_create_vmx (void)
{
+ static pixman_implementation_t vmx_imp;
pixman_implementation_t *fast = _pixman_implementation_create_fast_path ();
- pixman_implementation_t *imp = _pixman_implementation_create (fast, vmx_fast_paths);
+ pixman_implementation_t *imp = _pixman_implementation_create (&vmx_imp, fast, vmx_fast_paths);
/* Set up function pointers */