forked from enlightenment/efl
Evas gl_x11: Fix runtime switching of GL window configurations
Test case: - Elementary Test -- GLView --- Direct rendering Direct rendering would never happen in reality, because Evas GL had to fallback. The reason being that DR requires the window to have a depth buffer, but this depth buffer was no present in the default config. From elm, the solution is to set a special accel_preference, for instance "gl:depth". But setting this value right before calling elm_win_add() for the GLView test was already too late. Indeed, evas_x would keep the default configurations and reuse them no matter what was requested (ie. only RGB and RGBA would work). Solution: Implement a slightly more complex cache based on a hash map instead of just two static variables. Always request a new config if it's not found in the current hash. Store that config, and reuse it for the same config requests. Tons of line changes because of the name changes and the whitespace adjustments. Also some variables disappeared into the magic hash table.
This commit is contained in:
parent
07e95f8003
commit
5bdcea59db