pixman: Branch 'master' - 2 commits
Siarhei Siamashka
siamashka at kemper.freedesktop.org
Wed Jan 26 05:33:41 PST 2011
pixman/pixman-fast-path.c | 3 +--
pixman/pixman-matrix.c | 3 ---
pixman/pixman-trap.c | 6 ------
test/affine-test.c | 6 +++---
test/blitters-test.c | 16 ++++++++--------
test/scaling-crash-test.c | 18 +++++++++++++-----
test/scaling-test.c | 6 +++---
7 files changed, 28 insertions(+), 30 deletions(-)
New commits:
commit fead9eb82a7fc78a4927fff960d4cacea799bd9b
Author: Rolland Dudemaine <rolland at ghs.com>
Date: Tue Jan 25 15:08:26 2011 +0200
Fix "variable was set but never used" warnings
Removes useless variable declarations. This can only result in more
efficient code, as these variables where sometimes assigned, but
their values were never used.
diff --git a/pixman/pixman-fast-path.c b/pixman/pixman-fast-path.c
index 868175f..2f9f176 100644
--- a/pixman/pixman-fast-path.c
+++ b/pixman/pixman-fast-path.c
@@ -364,7 +364,7 @@ fast_composite_add_n_8888_8888_ca (pixman_implementation_t *imp,
int32_t width,
int32_t height)
{
- uint32_t src, srca, s;
+ uint32_t src, s;
uint32_t *dst_line, *dst, d;
uint32_t *mask_line, *mask, ma;
int dst_stride, mask_stride;
@@ -372,7 +372,6 @@ fast_composite_add_n_8888_8888_ca (pixman_implementation_t *imp,
src = _pixman_image_get_solid (imp, src_image, dst_image->bits.format);
- srca = src >> 24;
if (src == 0)
return;
diff --git a/pixman/pixman-matrix.c b/pixman/pixman-matrix.c
index f2f67ab..8d0d973 100644
--- a/pixman/pixman-matrix.c
+++ b/pixman/pixman-matrix.c
@@ -465,9 +465,6 @@ pixman_transform_from_pixman_f_transform (struct pixman_transform * t,
return TRUE;
}
-static const int a[3] = { 3, 3, 2 };
-static const int b[3] = { 2, 1, 1 };
-
PIXMAN_EXPORT pixman_bool_t
pixman_f_transform_invert (struct pixman_f_transform * dst,
const struct pixman_f_transform *src)
diff --git a/pixman/pixman-trap.c b/pixman/pixman-trap.c
index 8353992..742911c 100644
--- a/pixman/pixman-trap.c
+++ b/pixman/pixman-trap.c
@@ -235,7 +235,6 @@ pixman_add_traps (pixman_image_t * image,
pixman_trap_t * traps)
{
int bpp;
- int width;
int height;
pixman_fixed_t x_off_fixed;
@@ -245,7 +244,6 @@ pixman_add_traps (pixman_image_t * image,
_pixman_image_validate (image);
- width = image->bits.width;
height = image->bits.height;
bpp = PIXMAN_FORMAT_BPP (image->bits.format);
@@ -349,10 +347,8 @@ pixman_rasterize_trapezoid (pixman_image_t * image,
int y_off)
{
int bpp;
- int width;
int height;
- pixman_fixed_t x_off_fixed;
pixman_fixed_t y_off_fixed;
pixman_edge_t l, r;
pixman_fixed_t t, b;
@@ -364,11 +360,9 @@ pixman_rasterize_trapezoid (pixman_image_t * image,
if (!pixman_trapezoid_valid (trap))
return;
- width = image->bits.width;
height = image->bits.height;
bpp = PIXMAN_FORMAT_BPP (image->bits.format);
- x_off_fixed = pixman_int_to_fixed (x_off);
y_off_fixed = pixman_int_to_fixed (y_off);
t = trap->top + y_off_fixed;
commit 32e556df33b3cd3b31de8184f144b3065206406b
Author: Rolland Dudemaine <rolland at ghs.com>
Date: Tue Jan 25 14:14:57 2011 +0200
test: Use the right enum types instead of int to fix warnings
Green Hills Software MULTI compiler was producing a number
of warnings due to incorrect uses of int instead of the correct
corresponding pixman_*_t type.
diff --git a/test/affine-test.c b/test/affine-test.c
index 27f2567..f7f058a 100644
--- a/test/affine-test.c
+++ b/test/affine-test.c
@@ -40,9 +40,9 @@ test_composite (int testnum,
int w, h;
pixman_fixed_t scale_x = 65536, scale_y = 65536;
pixman_fixed_t translate_x = 0, translate_y = 0;
- int op;
- int repeat = 0;
- int src_fmt, dst_fmt;
+ pixman_op_t op;
+ pixman_repeat_t repeat = PIXMAN_REPEAT_NONE;
+ pixman_format_code_t src_fmt, dst_fmt;
uint32_t * srcbuf;
uint32_t * dstbuf;
uint32_t crc32;
diff --git a/test/blitters-test.c b/test/blitters-test.c
index 21685b1..42181ef 100644
--- a/test/blitters-test.c
+++ b/test/blitters-test.c
@@ -27,7 +27,7 @@ create_random_image (pixman_format_code_t *allowed_formats,
uint32_t *buf;
pixman_image_t *img;
- while (allowed_formats[n] != -1)
+ while (allowed_formats[n] != PIXMAN_null)
n++;
fmt = allowed_formats[lcg_rand_n (n)];
@@ -78,7 +78,7 @@ free_random_image (uint32_t initcrc,
uint32_t *data = pixman_image_get_data (img);
int height = pixman_image_get_height (img);
- if (fmt != -1)
+ if (fmt != PIXMAN_null)
{
/* mask unused 'x' part */
if (PIXMAN_FORMAT_BPP (fmt) - PIXMAN_FORMAT_DEPTH (fmt) &&
@@ -218,7 +218,7 @@ static pixman_format_code_t img_fmt_list[] = {
PIXMAN_a1r1g1b1,
PIXMAN_a1b1g1r1,
PIXMAN_a1,
- -1
+ PIXMAN_null
};
static pixman_format_code_t mask_fmt_list[] = {
@@ -226,7 +226,7 @@ static pixman_format_code_t mask_fmt_list[] = {
PIXMAN_a8,
PIXMAN_a4,
PIXMAN_a1,
- -1
+ PIXMAN_null
};
@@ -247,7 +247,7 @@ test_composite (int testnum, int verbose)
int dst_x, dst_y;
int mask_x, mask_y;
int w, h;
- int op;
+ pixman_op_t op;
pixman_format_code_t src_fmt, dst_fmt, mask_fmt;
uint32_t *dstbuf, *srcbuf, *maskbuf;
uint32_t crc32;
@@ -305,7 +305,7 @@ test_composite (int testnum, int verbose)
dst_y = lcg_rand_n (dst_height);
mask_img = NULL;
- mask_fmt = -1;
+ mask_fmt = PIXMAN_null;
mask_x = 0;
mask_y = 0;
maskbuf = NULL;
@@ -385,7 +385,7 @@ test_composite (int testnum, int verbose)
printf ("---\n");
}
- free_random_image (0, src_img, -1);
+ free_random_image (0, src_img, PIXMAN_null);
crc32 = free_random_image (0, dst_img, dst_fmt);
if (mask_img)
@@ -393,7 +393,7 @@ test_composite (int testnum, int verbose)
if (srcbuf == maskbuf)
pixman_image_unref(mask_img);
else
- free_random_image (0, mask_img, -1);
+ free_random_image (0, mask_img, PIXMAN_null);
}
FLOAT_REGS_CORRUPTION_DETECTOR_FINISH ();
diff --git a/test/scaling-crash-test.c b/test/scaling-crash-test.c
index 7a94115..40323d4 100644
--- a/test/scaling-crash-test.c
+++ b/test/scaling-crash-test.c
@@ -95,21 +95,29 @@ run_test (int32_t dst_width,
return result;
}
-typedef struct info_t info_t;
-struct info_t
+typedef struct filter_info_t filter_info_t;
+struct filter_info_t
{
- int value;
+ pixman_filter_t value;
char name[28];
};
-static const info_t filters[] =
+static const filter_info_t filters[] =
{
{ PIXMAN_FILTER_NEAREST, "NEAREST" },
{ PIXMAN_FILTER_BILINEAR, "BILINEAR" },
{ PIXMAN_FILTER_CONVOLUTION, "CONVOLUTION" },
};
-static const info_t repeats[] =
+typedef struct repeat_info_t repeat_info_t;
+struct repeat_info_t
+{
+ pixman_repeat_t value;
+ char name[28];
+};
+
+
+static const repeat_info_t repeats[] =
{
{ PIXMAN_REPEAT_PAD, "PAD" },
{ PIXMAN_REPEAT_REFLECT, "REFLECT" },
diff --git a/test/scaling-test.c b/test/scaling-test.c
index b90584b..e91df32 100644
--- a/test/scaling-test.c
+++ b/test/scaling-test.c
@@ -40,9 +40,9 @@ test_composite (int testnum,
int w, h;
pixman_fixed_t scale_x = 65536, scale_y = 65536;
pixman_fixed_t translate_x = 0, translate_y = 0;
- int op;
- int repeat = 0;
- int src_fmt, dst_fmt;
+ pixman_op_t op;
+ pixman_repeat_t repeat = PIXMAN_REPEAT_NONE;
+ pixman_format_code_t src_fmt, dst_fmt;
uint32_t * srcbuf;
uint32_t * dstbuf;
uint32_t crc32;
More information about the xorg-commit
mailing list