chromecast: Set display size to 1x1 on audio only devices

Set the default display size to 1x1 to minimize memory usage and CPU
associated with the graphics pipeline on devices with no display.  We had
this mitigation in the past, but it was lost in a refactor.

Unfortunately, cast applications may have graphical elements even on
audio only devices and fully disabling the graphics pipeline breaks
compatibility.

This reduces the total CPU runtime in a simple benchmark that loads a
cast audio application (assistant voice query to audio playback) by 7.3%.

Bug: b/135934185

Change-Id: I6bb80cd93d15083ac4528337faae8296f5187170
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1700532
Reviewed-by: Luke Halliwell <halliwell@chromium.org>
Commit-Queue: Michael Spang <spang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#677570}
1 file changed