Mir

Code review comment for lp:~vanvugt/mir/managed-surface

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

I think all this metadata can still be pointed to by a single instance of each surface object instead. We don't need to add new containers for that.

A hash table would obviously work, but it's neither the most efficient nor elegant solution. If you delete a surface for example, you'd also need to add all the logic to ensure the hash tables/maps you're maintaining in parallel get updated. Not to mention other methods during runtime. For example, if someone does set_state(foo) and your bespoke shell has an animation for foo, you need to have some wiring to initiate that. These are the future problems the approach proposed here solves.

While this branch is one example of achieving the goal without adding any new containers, there must be other ways too...

« Back to merge proposal