gpu: Empty swaps for surfaceless output surfaces.

This improves hardware overlay support by avoiding updates to the
primary plane when only overlays are damaged. The previous buffer
is now reused for the primary plane when damage rect is empty.

An important side-effect of this is that we can always support empty
swaps without the need for partial updates.

BUG=705290
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel

Review-Url: https://codereview.chromium.org/2829543003
Cr-Original-Commit-Position: refs/heads/master@{#466245}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: bba53b15c45ce0fa66d3343befae28aa695311c1
5 files changed