[xserver patch] Optimize shadowUpdatePacked()
From: Ilpo Ruotsalainen http://bugs.freedesktop.org/show_bug.cgi?id=26973 Signed-off-by: Adrian Bunk --- We already ship this patch in the ARM Linux Internet Platform, and it looks like a good candidate for upstream inclusion. The "#define PickBit" can be deleted, but that's unrelated. miext/shadow/shpacked.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/miext/shadow/shpacked.c b/miext/shadow/shpacked.c index 6736162..f95adf9 100644 --- a/miext/shadow/shpacked.c +++ b/miext/shadow/shpacked.c @@ -102,8 +102,7 @@ shadowUpdatePacked (ScreenPtr pScreen, width -= i; scr += i; #define PickBit(a,i) (((a) >> (i)) & 1) - while (i--) - *win++ = *sha++; + memcpy(win, sha, i * sizeof(FbBits)); } shaLine += shaStride; y++; -- 1.5.6.1 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [xserver patch] Optimize shadowUpdatePacked()
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Adrian Bunk wrote: > From: Ilpo Ruotsalainen > > http://bugs.freedesktop.org/show_bug.cgi?id=26973 > > Signed-off-by: Adrian Bunk > > --- > > We already ship this patch in the ARM Linux Internet Platform, and it > looks like a good candidate for upstream inclusion. > > The "#define PickBit" can be deleted, but that's unrelated. > > miext/shadow/shpacked.c |3 +-- > 1 files changed, 1 insertions(+), 2 deletions(-) > > diff --git a/miext/shadow/shpacked.c b/miext/shadow/shpacked.c > index 6736162..f95adf9 100644 > --- a/miext/shadow/shpacked.c > +++ b/miext/shadow/shpacked.c > @@ -102,8 +102,7 @@ shadowUpdatePacked (ScreenPtr pScreen, > width -= i; > scr += i; > #define PickBit(a,i) (((a) >> (i)) & 1) > - while (i--) > - *win++ = *sha++; > + memcpy(win, sha, i * sizeof(FbBits)); > } > shaLine += shaStride; > y++; Are the values of "win" and "sha" used later in the code? Are the regions of memory accessed by "win" and "sha" known to not overlap in a way that works with the current code but might break with memcpy? Those are the only two possible issues that I could see from this change. -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkunuwwACgkQX1gOwKyEAw9d8wCgggd1YphBD+UTWkpp4zJGWnSH gtoAnia/p3e2zW85+Ohm2QnMDrrfGA9Y =uExZ -END PGP SIGNATURE- ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [xserver patch] Optimize shadowUpdatePacked()
On Mon, Mar 22, 2010 at 08:13:42PM +0200, Adrian Bunk wrote: > From: Ilpo Ruotsalainen > > http://bugs.freedesktop.org/show_bug.cgi?id=26973 > > Signed-off-by: Adrian Bunk > > --- > > We already ship this patch in the ARM Linux Internet Platform, and it > looks like a good candidate for upstream inclusion. > > The "#define PickBit" can be deleted, but that's unrelated. I assume you're only using this for rotation? If so, it'd be much better to bang up a quick skeleton RandR 1.2 implementation that could reuse the software rotation code from Xorg, which will be accelerated far better through pixman's insanely-optimised CopyArea. Cheers, Daniel pgpKDHZ2keH8y.pgp Description: PGP signature ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel