Mir

Code review comment for lp://staging/~vanvugt/mir/fix-buffers_ready_for_compositor

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

#1
Yeah I knew about QtMir already. It will need fixing. Hopefully without reintroducing the old Renderable method but we'll see. It's a simple matter of code but needs the involvement of Unity8 guys more to test the changes.

#2
The observer architecture obviously doesn't solve all problems. Compositors can and will occasionally skip over some renderable and not consume its buffer. Compositors are free to make their own decisions, so we should support any outcome from that.
  I don't think this is strange or inconsistent though. A compositor's default state is to be asleep. We _need_ the observer stuff to wake it up. And we _need_ a separate counter to cover the case of rendering N frames after N were scheduled might not be enough (due to occlusions whatever). Callback-based observers can not solve this problem, but semaphore-based observers could, so read on...
  I did consider a more unified approach that might work. That is a singular counter (like a semaphore) stored in the scene where each surface adds to the counter when it has something new not consumed. And critically, only the surface/producer can then remove its count from the scene total when it's flushed. But that's an architectural rework, bigger than this proposal and possibly could end up more complicated with some new coupling too. So first a fix, and later maybe redesign.

« Back to merge proposal