Destroy GLX windows when they are backgrounded

Because GLX windows cannot be destroyed separately from their
X windows on all platforms, create a separate child X window to use
with GLX. Destroy this child X window when the backbuffer for the
window is no longer needed.

Because the GL surface may need to be made current while its
backbuffer is destroyed (e.g, to destroy GL resources for a
backgrounded tab), create a dummy 1x1 GL surface which is
never destroyed and can always be made current.

Because the child X window created will cover its parent, create an
event listener to forward expose events from the child window to
the parent, so that the parent can know to repaint.

BUG=145600

Review URL: https://chromiumcodereview.appspot.com/23452026

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@223148 0039d316-1c4b-4281-b951-d872f2087c98
3 files changed