mirror of
https://salsa.debian.org/xorg-team/lib/pixman
synced 2025-08-29 06:03:17 +00:00
Make use of image flags in mmx and sse2 iterators
Now that we have the full image flags available, the SSE2 and MMX iterators can simply check against SAMPLES_COVER_CLIP_NEAREST (which is computed in pixman_image_composite32()) instead of comparing all the x/y/width/height parameters.
This commit is contained in:
parent
c1065a9cb4
commit
c2230fe2af
@ -3656,19 +3656,13 @@ static void
|
||||
mmx_src_iter_init (pixman_implementation_t *imp, pixman_iter_t *iter)
|
||||
{
|
||||
pixman_image_t *image = iter->image;
|
||||
int x = iter->x;
|
||||
int y = iter->y;
|
||||
int width = iter->width;
|
||||
int height = iter->height;
|
||||
|
||||
#define FLAGS \
|
||||
(FAST_PATH_STANDARD_FLAGS | FAST_PATH_ID_TRANSFORM | FAST_PATH_BITS_IMAGE)
|
||||
(FAST_PATH_STANDARD_FLAGS | FAST_PATH_ID_TRANSFORM | \
|
||||
FAST_PATH_BITS_IMAGE | FAST_PATH_SAMPLES_COVER_CLIP_NEAREST)
|
||||
|
||||
if ((iter->iter_flags & ITER_NARROW) &&
|
||||
(iter->image_flags & FLAGS) == FLAGS &&
|
||||
x >= 0 && y >= 0 &&
|
||||
x + width <= image->bits.width &&
|
||||
y + height <= image->bits.height)
|
||||
(iter->image_flags & FLAGS) == FLAGS)
|
||||
{
|
||||
const fetcher_info_t *f;
|
||||
|
||||
@ -3679,7 +3673,7 @@ mmx_src_iter_init (pixman_implementation_t *imp, pixman_iter_t *iter)
|
||||
uint8_t *b = (uint8_t *)image->bits.bits;
|
||||
int s = image->bits.rowstride * 4;
|
||||
|
||||
iter->bits = b + s * iter->y + x * PIXMAN_FORMAT_BPP (f->format) / 8;
|
||||
iter->bits = b + s * iter->y + iter->x * PIXMAN_FORMAT_BPP (f->format) / 8;
|
||||
iter->stride = s;
|
||||
|
||||
iter->get_scanline = f->get_scanline;
|
||||
|
@ -5976,19 +5976,13 @@ static void
|
||||
sse2_src_iter_init (pixman_implementation_t *imp, pixman_iter_t *iter)
|
||||
{
|
||||
pixman_image_t *image = iter->image;
|
||||
int x = iter->x;
|
||||
int y = iter->y;
|
||||
int width = iter->width;
|
||||
int height = iter->height;
|
||||
|
||||
#define FLAGS \
|
||||
(FAST_PATH_STANDARD_FLAGS | FAST_PATH_ID_TRANSFORM | FAST_PATH_BITS_IMAGE)
|
||||
(FAST_PATH_STANDARD_FLAGS | FAST_PATH_ID_TRANSFORM | \
|
||||
FAST_PATH_BITS_IMAGE | FAST_PATH_SAMPLES_COVER_CLIP_NEAREST)
|
||||
|
||||
if ((iter->iter_flags & ITER_NARROW) &&
|
||||
(iter->image_flags & FLAGS) == FLAGS &&
|
||||
x >= 0 && y >= 0 &&
|
||||
x + width <= image->bits.width &&
|
||||
y + height <= image->bits.height)
|
||||
(iter->image_flags & FLAGS) == FLAGS)
|
||||
{
|
||||
const fetcher_info_t *f;
|
||||
|
||||
@ -5999,7 +5993,7 @@ sse2_src_iter_init (pixman_implementation_t *imp, pixman_iter_t *iter)
|
||||
uint8_t *b = (uint8_t *)image->bits.bits;
|
||||
int s = image->bits.rowstride * 4;
|
||||
|
||||
iter->bits = b + s * iter->y + x * PIXMAN_FORMAT_BPP (f->format) / 8;
|
||||
iter->bits = b + s * iter->y + iter->x * PIXMAN_FORMAT_BPP (f->format) / 8;
|
||||
iter->stride = s;
|
||||
|
||||
iter->get_scanline = f->get_scanline;
|
||||
|
Loading…
Reference in New Issue
Block a user