apitrace/apitrace — pull request #160 by ahartmetz (2013-07-08 11:45:55+00:00)
Title: Attrib list

Summary is in the commit messages.

WGL support is currently missing.

Some points worth debating:
- How to handle keys not listed in the AttribArray? It is probably not optimal currently. Defaulting the value type to the generic enum of the API in question (e.g. EGLenum for EGL) would save mentioning some key-value pairs at all, they'd work automatically. This would require being less paranoid about attrib_list overflows and not assume no value if the key is unknown. Note that the current code assumes no value for unknown keys when determining attrib_list length, but int value when iterating over attrib_list later. This has the effect that a null value after an unknown key terminates the attrib_list as currently interpreted.
- Related to previous: Is it a good idea to always specify the allowed value set, or would it be better to just pass in a superset? E.g. EGLenum for EGL functions where values are normal enums (as opposed to bitflags).
- It looks like Traverser and ComplexValueSerializer are partially doing the same thing, is that true and if so, what can be done about it? I am surprised that I only had to add a no-op visitAttribArray() in ComplexValueSerializer and everything I know how to test already works.