bits: optimise fetching width==1 repeats
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 22 Aug 2011 14:29:25 +0000 (15:29 +0100)
committerSøren Sandmann Pedersen <ssp@redhat.com>
Sat, 10 Sep 2011 03:43:16 +0000 (23:43 -0400)
commitf5da52b6774bdefdfa88a28fdc3904797adb7e26
treeb5d62deb756dbbcf7d57548aeb4c4f722a0ddd17
parent7ef44cae6ba6d1c2aae94cdc10851fa8d14821f7
bits: optimise fetching width==1 repeats

Profiling ign.com, 20% of the entire render time was absorbed in this
single operation:

<< /content //COLOR_ALPHA /width 480 /height 800 >> surface context
<< /width 1 /height 677 /format //ARGB32 /source <|!!!@jGb!m5gD']#$jFHGWtZcK&2i)Up=!TuR9`G<8;ZQp[FQk;emL9ibhbEL&NTh-j63LhHo$E=mSG,0p71`cRJHcget4%<S\X+~> >> image pattern
  //EXTEND_REPEAT set-extend
  set-source
n 0 0 480 677 rectangle
fill+
pop

which is a simple composition of a single pixel wide image. Sadly this
is a workaround for lack of independent repeat-x/y handling in cairo and
pixman. Worse still is that the worst-case behaviour of the general repeat
path is for width 1 images...

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
pixman/pixman-bits-image.c