]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix copying of MEMBUFs to MEMBUFs. This case was implemented by using
authorbde <bde@FreeBSD.org>
Mon, 8 Apr 2019 04:54:15 +0000 (04:54 +0000)
committerbde <bde@FreeBSD.org>
Mon, 8 Apr 2019 04:54:15 +0000 (04:54 +0000)
commit58aa509054ac8eaea95e3741132f5f7c7aab7f96
treea8b49ada9bf8885cfad711a5abe7d13dd8f76c69
parenta5438c4529576d19d4db4409ed0c1dd5527357d8
Fix copying of MEMBUFs to MEMBUFs.  This case was implemented by using
the same code as the VIDBUF8 case, so it only worked for depths <= 8.
The 2 directions for copying between VIDBUFs and MEMBUFs worked by using
a Read/Write organization which makes the destination a VIDBUF so the
MEMBUF case was not reached, and the VIDBUF cases have already been fixed.

Fix this by removing "optimizations" for the VIDBUF8 case so that the
MEMBUF case can fall through to the general (non-segmented) case.  The
optimizations were to duplicate code for the VIDBUF8 case so as to
avoid 2 multiplications by 1 at runtime.  This optimization is not useful
since the multiplications are not in the inner loop.

Remove the same "optimization" for the VIDBUF8S case.  It was even less
useful there since it duplicated more to do relatively less.
lib/libvgl/bitmap.c