Reduce chance of OOM in case of resolution change.

In case of resolution change the resize function tries to allocate a
new scanout buffer and in case of failure it will fall back to try
reusing the previous buffer if the buffer requested is smaller.

Change-Id: Ib81f0628332a60f57fc7b75c2b0754d51c541406
3 files changed