Mir

Merge lp://qastaging/~kdub/mir/fix-1413211 into lp://qastaging/mir

Proposed by Kevin DuBois
Status: Merged
Approved by: Alan Griffiths
Approved revision: no longer in the source branch.
Merged at revision: 2302
Proposed branch: lp://qastaging/~kdub/mir/fix-1413211
Merge into: lp://qastaging/mir
Diff against target: 88 lines (+29/-21)
3 files modified
src/server/graphics/software_cursor.cpp (+8/-20)
src/server/graphics/software_cursor.h (+1/-1)
tests/unit-tests/graphics/test_software_cursor.cpp (+20/-0)
To merge this branch: bzr merge lp://qastaging/~kdub/mir/fix-1413211
Reviewer Review Type Date Requested Status
Alan Griffiths Approve
Daniel van Vugt Abstain
Alexandros Frantzis (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+248560@code.qastaging.launchpad.net

Commit message

Ensure that mg::Buffer::write won't block when writing the SoftwareCursor by allocating a fresh buffer each time an update is needed.

fixes: LP: #1413211

Description of the change

Ensure that mg::Buffer::write won't block when writing the SoftwareCursor by allocating a fresh buffer each time an update is needed.

fixes: LP: #1413211

This seemed like the least obtrusive fix for this problem. Basically, the mg::Buffer::write() to update pixel contents was blocking because the cursor was always onscreen, and there wasn't an opportunity to write to the buffer.

To post a comment you must log in.
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

The same bugs exist for touchspots and other overlays. Shouldn't we be fixing this in some common code?

The bug description is certainly generalised, so if we do just fix it for software cursor, then this is not a fix for the attached bug. Call it a partial workaround and keep the bug open?

review: Needs Information
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Kevin DuBois (kdub) wrote :

The compositor jerkiness when touchspots are on (lp: #1373692) and this bug (lp: #1413211) are two different root causes. This one is a lockup because another part of the system tries to write to a buffer that is onscreen, and the android code disallows this to avoid tearing on the cursor image. The other bug's root cause is more that certain android devices don't have any fences or waits that stop the composition threads from spiking if we're trying to post the exact same thing twice in a row.

Revision history for this message
Alexandros Frantzis (afrantzis) wrote :

Looks good.

Also tested on Mesa/intel.

review: Approve
Revision history for this message
Daniel van Vugt (vanvugt) :
review: Abstain
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

Maybe I'm just not attuned to this bit of the code but this doesn't feel elegant.

But I don't have another idea ready.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches