Keep track of the scale of the buffer set by surface.set_buffer_scale.
Calculate the height and width of the texture from the buffer depending on the
scale when it is attached.
Use buffer damage to determine the damage of the buffer when flushing damage.
Convert surface damage to buffer damage and union to the surface buffer_damage
prior to flushing damage.
The surface frame callback lets a window know when it is a good time to show the
next frame if it is animating. In particular, this callback is used by
weston-simple-shm to throttle drawing.