VR: Avoid drawing the overlay Texture when it's empty.

The fallback Android UI path incurs a significant overhead cost to our
rendering pipeline when it's active, which used to be 100% of the time.

This CL uses a dummy canvas that extends the Android canvas and throws
an exception every time something is drawn to it to know whether or not
drawing the view tree was a no-op. If not a no-op, it actually draws
the view tree into our texture-backed canvas.

If the canvas is empty, then we can skip compositing it in our VR
rendering pipeline.

Bug: 830930
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_vr;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: Ic1c93eeae67485e4d4f450598d6b9690d60d99ba
Reviewed-on: https://chromium-review.googlesource.com/999802
Commit-Queue: Michael Thiessen <mthiesse@chromium.org>
Reviewed-by: Christopher Grant <cjgrant@chromium.org>
Reviewed-by: Yash Malik <ymalik@chromium.org>
Cr-Commit-Position: refs/heads/master@{#549907}
17 files changed