mirror of
https://github.com/brl/mutter.git
synced 2025-01-23 09:59:03 +00:00
Neil Roberts
1df0e36c6c
cogl: Use a vtable for the texture backends instead of a type and switch
Instead of storing an enum with the backend type for each texture and then using a switch statement to decide which function to call, we should store pointers to all of the functions in a struct and have each texture point to that struct. This is potentially slightly faster when there are more backends and it makes implementing new backends easier because it's more obvious which functions have to be implemented.
Description
Languages
C
98.9%
Meson
0.7%
Python
0.3%