mirror of
https://github.com/brl/mutter.git
synced 2025-02-26 09:44:10 +00:00

Previously the texture unit settings were stored in growable GArrays and every time a new texture unit was encountered it would expand the arrays. However the array wasn't copied when stored in a CoglGles2WrapperSettings struct so all settings had the same array. This meant that it wouldn't detect that a different program is needed if a texture unit is disabled or enabled. The texture unit settings arrays are all now a fixed size and the enabledness of each unit is stored in a bit mask. Therefore the settings can just be copied around by assignment as before. This puts a limit on the number of texture units accessible by Cogl but I think it is worth it to make the code simpler and more efficient. The material API already poses a limit on the number of texture units it can use.
Description
Languages
C
98.9%
Meson
0.7%
Python
0.3%