kopper: copy a bunch of code for texture_from_pixmap

seems to work?

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <!16152>
156 jobs for !16152 with tfp in 57 minutes and 40 seconds (queued for 7 seconds)
latest merge request