pixman: Branch 'master' - 2 commits
Søren Sandmann Pedersen
sandmann at kemper.freedesktop.org
Fri Jun 18 17:34:36 PDT 2010
pixman/pixman-access.c | 42 ++++++++++++++++++++++++++++++++++++++----
test/blitters-test.c | 2 +-
2 files changed, 39 insertions(+), 5 deletions(-)
New commits:
commit 66365b5ef1bb85863669227ae6e31134d8d57013
Author: Søren Sandmann Pedersen <ssp at redhat.com>
Date: Sun May 30 18:26:28 2010 -0400
Make separate gray scanline storers.
For gray formats the palettes are indexed by luminance, not RGB, so we
can't use the color storers for gray too.
diff --git a/pixman/pixman-access.c b/pixman/pixman-access.c
index 9f2af26..9708b10 100644
--- a/pixman/pixman-access.c
+++ b/pixman/pixman-access.c
@@ -2385,6 +2385,22 @@ store_scanline_c8 (bits_image_t * image,
}
static void
+store_scanline_g8 (bits_image_t * image,
+ int x,
+ int y,
+ int width,
+ const uint32_t *values)
+{
+ uint32_t *bits = image->bits + image->rowstride * y;
+ uint8_t *pixel = ((uint8_t *) bits) + x;
+ const pixman_indexed_t *indexed = image->indexed;
+ int i;
+
+ for (i = 0; i < width; ++i)
+ WRITE (image, pixel++, RGB24_TO_ENTRY_Y (indexed,values[i]));
+}
+
+static void
store_scanline_x4a4 (bits_image_t * image,
int x,
int y,
@@ -2555,6 +2571,26 @@ store_scanline_c4 (bits_image_t * image,
}
static void
+store_scanline_g4 (bits_image_t * image,
+ int x,
+ int y,
+ int width,
+ const uint32_t *values)
+{
+ uint32_t *bits = image->bits + image->rowstride * y;
+ const pixman_indexed_t *indexed = image->indexed;
+ int i;
+
+ for (i = 0; i < width; ++i)
+ {
+ uint32_t pixel;
+
+ pixel = RGB24_TO_ENTRY_Y (indexed, values[i]);
+ STORE_4 (image, bits, i + x, pixel);
+ }
+}
+
+static void
store_scanline_a1 (bits_image_t * image,
int x,
int y,
@@ -2746,7 +2782,6 @@ static const format_info_t accessors[] =
#define fetch_scanline_g8 fetch_scanline_c8
#define fetch_pixel_g8 fetch_pixel_c8
-#define store_scanline_g8 store_scanline_c8
FORMAT_INFO (g8),
#define fetch_scanline_x4c4 fetch_scanline_c8
@@ -2756,7 +2791,7 @@ static const format_info_t accessors[] =
#define fetch_scanline_x4g4 fetch_scanline_c8
#define fetch_pixel_x4g4 fetch_pixel_c8
-#define store_scanline_x4g4 store_scanline_c8
+#define store_scanline_x4g4 store_scanline_g8
FORMAT_INFO (x4g4),
FORMAT_INFO (x4a4),
@@ -2772,7 +2807,6 @@ static const format_info_t accessors[] =
#define fetch_scanline_g4 fetch_scanline_c4
#define fetch_pixel_g4 fetch_pixel_c4
-#define store_scanline_g4 store_scanline_c4
FORMAT_INFO (g4),
/* 1bpp formats */
diff --git a/test/blitters-test.c b/test/blitters-test.c
index 29c2515..2673968 100644
--- a/test/blitters-test.c
+++ b/test/blitters-test.c
@@ -426,6 +426,6 @@ main (int argc, const char *argv[])
{
initialize_palette();
- return fuzzer_test_main("blitters", 2000000, 0xF3A16994,
+ return fuzzer_test_main("blitters", 2000000, 0xD09B1C03,
test_composite, argc, argv);
}
commit 4e1d4847c9199f96b73376bef061c6728742e621
Author: Søren Sandmann Pedersen <ssp at redhat.com>
Date: Sun May 30 16:52:09 2010 -0400
When storing a g1 pixel, store the lowest bit, rather than comparing with 0.
diff --git a/pixman/pixman-access.c b/pixman/pixman-access.c
index 809cc38..9f2af26 100644
--- a/pixman/pixman-access.c
+++ b/pixman/pixman-access.c
@@ -2601,7 +2601,7 @@ store_scanline_g1 (bits_image_t * image,
#else
mask = 1 << ((i + x) & 0x1f);
#endif
- v = RGB24_TO_ENTRY_Y (indexed, values[i]) ? mask : 0;
+ v = RGB24_TO_ENTRY_Y (indexed, values[i]) & 0x1 ? mask : 0;
WRITE (image, pixel, (READ (image, pixel) & ~mask) | v);
}
diff --git a/test/blitters-test.c b/test/blitters-test.c
index 673e52f..29c2515 100644
--- a/test/blitters-test.c
+++ b/test/blitters-test.c
@@ -426,6 +426,6 @@ main (int argc, const char *argv[])
{
initialize_palette();
- return fuzzer_test_main("blitters", 2000000, 0x2CFE57ED,
+ return fuzzer_test_main("blitters", 2000000, 0xF3A16994,
test_composite, argc, argv);
}
More information about the xorg-commit
mailing list