On Saturday 29 January 2011 03:12:21 Søren Sandmann wrote:
> From: Søren Sandmann Pedersen <s...@redhat.com>
> 
> New output of lowlevel-blt-bench over_x888_8_0565:
> 
> over_x888_8_0565 =  L1:  55.68  L2:  55.11  M: 52.83 ( 19.04%)  HT: 39.62 
> VT: 37.70  R: 30.88  RT: 14.62 ( 174Kops/s)
> 
> The fetcher is looked up in a table, so that other fetchers can easily
> be added.

> +static void
> +sse2_src_iter_init (pixman_implementation_t *imp,
> +                 pixman_iter_t *iter,
> +                 pixman_image_t *image,
> +                 int x, int y, int width, int height,
> +                 uint8_t *buffer, iter_flags_t flags)
> +{
> +#define FLAGS                                                                
\
> +    (FAST_PATH_STANDARD_FLAGS | FAST_PATH_ID_TRANSFORM)
> +
> +    if ((flags & ITER_NARROW)                                &&
> +     (image->common.flags & FLAGS) == FLAGS          &&
> +     x >= 0 && y >= 0                                &&
> +     x + width <= image->bits.width                  &&
> +     y + height <= image->bits.height)
> +    {
> +     const fetcher_info_t *f;
> +
> +     for (f = &fetchers[0]; f->format != PIXMAN_null; f++)
> +     {
> +         if (image->common.extended_format_code == f->format)
> +         {
> +             uint8_t *b = (uint8_t *)image->bits.bits;
> +             int s = image->bits.rowstride * 4;
> +
> +             iter->bits = b + s * y + x * PIXMAN_FORMAT_BPP (f->format) / 8;
> +             iter->stride = s;
> +             iter->width = width;
> +             iter->buffer = (uint32_t *)buffer;
> +
> +             iter->get_scanline = f->get_scanline;
> +             return;
> +         }
> +     }
> +    }
> +
> +    _pixman_implementation_src_iter_init (
> +     imp->delegate, iter, image, x, y, width, height, buffer, flags);
> +}

Are we going to have this new code performing linear search in this array
once per each compositing operation now? It may be bad for performance unless
some kind of caching (at the time of pixman_image_t creation?) can be
added later.

Also is there a plan to provide SSE2 optimized store functions in addition
to fetchers later?

Anyway, with such changes coming, I see more and more reasons to avoid general
compositing path in pixman as much as possible :)

-- 
Best regards,
Siarhei Siamashka
_______________________________________________
Pixman mailing list
Pixman@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pixman

Reply via email to