Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit add458fe authored by Dennis Kempin's avatar Dennis Kempin
Browse files

Surface: Do not copy back if front and back buffer are identical

It is unnecessary to copy from and to the same surface. Skipping
the copy back is a huge performance improvement when using shared
buffer mode and locking a rectangle of the surface.

Bug: 38398135
Test: Use stylus demo and remove full-surface locking hack.
Change-Id: Ie8d03468507489247ba4a4be5f0cde5960e69c16
parent 74cb3b6d
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -1518,6 +1518,9 @@ static status_t copyBlt(
        const Region& reg,
        int *dstFenceFd)
{
    if (dst->getId() == src->getId())
        return OK;

    // src and dst with, height and format must be identical. no verification
    // is done here.
    status_t err;