Fixed bugs with Pepper 3D under dynamic GPU switching.

Made Pepper 3D context creation code fully aware of GPU switching and changed
the order of context creation and and fetching of the parent context.
Creating the context potentially causes all existing contexts for that
renderer, including the parent, to be lost.

Detect shutting down of the GPU channel more quickly on the renderer side.

Only reject context creation in GLContextCGL upon GpuPreference mismatch if
the system supports dual GPUs.

Will update tools/histograms/histograms.xml as soon as this is committed;
must occur in a separate CL.

BUG=100507
TEST=tested navigating to and from, and reloading, NaCl Pepper 3D samples on Mac 10.6.8 and 10.7.1; WebGL tests
Review URL: http://codereview.chromium.org/8342024

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