Fix SGI_video_sync cpu usage and rendering issues with Nvidia driver.

Using the GLX_SGI_video_sync extension has caused high cpu usage and
rendering problems. The cpu usage was worked around by throttling the
use of the extension to once every 5 seconds. The rendering problems
started happening with Nvidia driver 361.42 and was being worked around
by not using the extension.

This CL fixes both problems by doing the following:
1. Using a separate unmapped child window (and GLX drawable) for use
   with SGI_video_sync.
2. Create a dummy unmapped window on both the main X Display and the
   video sync Display before the sandbox is set up.
3. Whitelist the Nvidia device files that are opened after the sandbox
   is set up.

This CL also makes all vsync providers use a single GLXContext because
there's only one thread that's used for all of them.

R=piman@chromium.org,rickyz@chromium.org
BUG=636644,483721
TEST=manual testing with i3 wm (no compositing)

Review-Url: https://codereview.chromium.org/2291373002
Cr-Commit-Position: refs/heads/master@{#417747}
2 files changed