clutter-stage-cogl: Use regions
Currently we repaint the bounding rect of all damage on stage level. To reduce overpaint, we should get to a point were we only repaint the areas that actually need repainting. This is one step in that direction.
The first commit is a rebased and slightly tweaked patch from @carlosg in https://bugzilla.gnome.org/show_bug.cgi?id=782344, introducing regions to clutter-stage-cogl
The second one takes it a bit further to also use regions for the swap.
Helps with #695 (closed)
Edited by Robert Mader