mirror of
https://salsa.debian.org/xorg-team/lib/pixman
synced 2025-09-01 02:10:49 +00:00
glyph-test: Avoid setting solid images as alpha maps.
glyph-test would sometimes set a solid image as an alpha map, which is not allowed. When this happened and the debug spew was enabled, messages like this one would be generated: *** BUG *** In pixman_image_set_alpha_map: The expression !alpha_map || alpha_map->type == BITS was false Set a breakpoint on '_pixman_log_error' to debug Fix this by not passing the ALLOW_SOLID flag to create_image() when the resulting is to be used as an alpha map.
This commit is contained in:
parent
38fe7cd7be
commit
5b0563f39e
@ -199,7 +199,7 @@ create_image (int max_size, const pixman_format_code_t *formats, uint32_t flags)
|
||||
alpha_x = lcg_rand_n (width);
|
||||
alpha_y = lcg_rand_n (height);
|
||||
alpha_map =
|
||||
create_image (max_size, formats, (flags & ~ALLOW_ALPHA_MAP));
|
||||
create_image (max_size, formats, (flags & ~(ALLOW_ALPHA_MAP | ALLOW_SOLID)));
|
||||
pixman_image_set_alpha_map (image, alpha_map, alpha_x, alpha_y);
|
||||
pixman_image_unref (alpha_map);
|
||||
}
|
||||
@ -330,6 +330,6 @@ int
|
||||
main (int argc, const char *argv[])
|
||||
{
|
||||
return fuzzer_test_main ("glyph", 30000,
|
||||
0x1B7696A2,
|
||||
0x741CB2DB,
|
||||
test_glyphs, argc, argv);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user