Import offscreen rendering window/buffer class implementation from libhybris

Signed-off-by: Simon Busch <morphis@gravedo.de>