[Pixman] [PATCH 06/12] vmx: implement fast path vmx_composite_over_n_8888_8888_ca

Oded Gabbay oded.gabbay at gmail.com
Thu Jul 16 03:30:55 PDT 2015


On Thu, Jul 16, 2015 at 12:39 PM, Siarhei Siamashka
<siarhei.siamashka at gmail.com> wrote:
> The explanation is actually rather simple. The functions
> composite_over_n_8888_8888_ca and composite_over_n_8888_8888
> are working with text glyphs and text glyphs typically contain a lot
> of fully transparent pixels. The C fast path code typically contains
> branches, which skip over such pixels. For example, have a look
> at (not exactly this particular functions, but explains the idea):
>     http://cgit.freedesktop.org/pixman/commit/?id=2bc59006d7fe91abf68a2061ad86c06e1b2964ab

The vmx fast path that I added also contains branches which skip over
transparent pixels.
>From vmx_composite_over_n_8888_8888_ca:

<snip>
   /* pm is NOT necessarily 16-byte aligned */
   vmx_mask = load_128_unaligned (pm);

   pack_cmp = vec_all_eq(vmx_mask, (vector unsigned int) AVV(0));

   /* if all bits in mask are zero, pack_cmp is not 0 */
   if (pack_cmp == 0)
   {
<snip>

Unfortunately, the above check is only when the destination is aligned
to 16-byte boundary.

        Oded


More information about the Pixman mailing list