Retry 3 to split WebGraphicsContext3DCommandBufferImpl::initialize() into two stages.

This CL splits out creation of the context from channel creation.  The
WebGraphicsContext3D will not be fully initialized until MakeCurrent is called
on it, at which point it is tied to the calling thread.

As compared to previous land attempts, this has:
- Protection against isContextLost being called on a dead context
- WebKit-side protection to ensure that GraphicsContext3Ds get made current
- Pepper modified to makeCurrent new contexts

Original review URL: http://codereview.chromium.org/7713015

Review URL: http://codereview.chromium.org/7860028

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100955 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/build/common.gypi b/build/common.gypi
index 0e435d65..a4734cd 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -173,6 +173,9 @@
       # Remoting compilation is enabled by default. Set to 0 to disable.
       'remoting%': 1,
 
+      # Threaded compositing
+      'use_threaded_compositing%': 0,
+
       # P2P APIs are compiled in by default. Set to 0 to disable.
       # Also note that this should be enabled for remoting to compile.
       'p2p_apis%': 1,
@@ -315,6 +318,7 @@
     'use_titlecase_in_grd_files%': '<(use_titlecase_in_grd_files)',
     'use_third_party_translations%': '<(use_third_party_translations)',
     'remoting%': '<(remoting)',
+    'use_threaded_compositing%': '<(use_threaded_compositing)',
     'enable_webrtc%': '<(enable_webrtc)',
     'p2p_apis%': '<(p2p_apis)',
     'configuration_policy%': '<(configuration_policy)',
@@ -812,6 +816,9 @@
       ['remoting==1', {
         'defines': ['ENABLE_REMOTING=1'],
       }],
+      ['use_threaded_compositing==1', {
+        'defines': ['WTF_USE_THREADED_COMPOSITING'],
+      }],
       ['p2p_apis==1', {
         'defines': ['ENABLE_P2P_APIS=1'],
       }],
@@ -825,6 +832,7 @@
         'defines': ['ENABLE_CONFIGURATION_POLICY'],
       }],
       ['fastbuild!=0', {
+
         'conditions': [
           # For Windows, we don't genererate debug information.
           ['OS=="win"', {