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

Commit bbde6915 authored by Steven Thomas's avatar Steven Thomas Committed by android-build-merger
Browse files

Merge "When dropping a frame, merge its damage region" into qt-r1-dev am: fcc3962a

am: 84a792e0

Change-Id: Icb10b8e53a113796ed8eccb7d3a61a473643bc96
parents 2212645b 84a792e0
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -940,6 +940,15 @@ status_t BufferQueueProducer::queueBuffer(int slot,
                    }
                }

                // Make sure to merge the damage rect from the frame we're about
                // to drop into the new frame's damage rect.
                if (last.mSurfaceDamage.bounds() == Rect::INVALID_RECT ||
                    item.mSurfaceDamage.bounds() == Rect::INVALID_RECT) {
                    item.mSurfaceDamage = Region::INVALID_REGION;
                } else {
                    item.mSurfaceDamage |= last.mSurfaceDamage;
                }

                // Overwrite the droppable buffer with the incoming one
                mCore->mQueue.editItemAt(mCore->mQueue.size() - 1) = item;
                frameReplacedListener = mCore->mConsumerListener;