Hans Leidekker hans@it.vu.nl writes:
This patch doesn't go as far as allocating and initializing a color space on DC creation. It simply creates (a dummy) one when asked for, to avoid any impact on performance. It also doesn't fully implement color space handles, instead it simply casts a pointer to a handle and back.
This cannot possibly work, the pointer won't remain valid. If you don't want to implement proper handles then return something like 0xdeadbeef and print a FIXME so that it's at least obvious that something's not working right. Your approach will only lead to mysterious crashes.