2022-06-09, 19:40
As a small heads up, I'm thinking about moving to an explicit layering system in Kodi 21.
Right now, Kodi uses an implicit system. The order in which assets are rendered is determined by their respective position in the XML. An explicit system would mean that there would be a tag which specifies the layer for the controls. It would be up to the skinner to ensure proper layering.
In a prototype of mine, each control group would bump its layer height by one. On the Estuary home screen, the left hand menu would render below the elements on the right hand side, due to its group stack being lower. But this can easily be fixed by setting the layer height manually.
This system has a multitude of advantages. From a skinner side, it would mean that elements of different groups can be interleaved in the depth they are rendered at. This could reduce the the numbers of controls needed. It eliminates the need to fix layering issues by copying elements.
From the GUI engine side, it would make it possible to apply a number of optimizations which could lead to significant performance improvements on more expensive skins.
Right now, Kodi uses an implicit system. The order in which assets are rendered is determined by their respective position in the XML. An explicit system would mean that there would be a tag which specifies the layer for the controls. It would be up to the skinner to ensure proper layering.
In a prototype of mine, each control group would bump its layer height by one. On the Estuary home screen, the left hand menu would render below the elements on the right hand side, due to its group stack being lower. But this can easily be fixed by setting the layer height manually.
This system has a multitude of advantages. From a skinner side, it would mean that elements of different groups can be interleaved in the depth they are rendered at. This could reduce the the numbers of controls needed. It eliminates the need to fix layering issues by copying elements.
From the GUI engine side, it would make it possible to apply a number of optimizations which could lead to significant performance improvements on more expensive skins.