Add the ability for the GPU process to be used to paint the backing store of a
tab. This is the first pass and is currently a bit buggy and incomplete.

This patch refactors the backing store to make it a virtual interface which is
then implemented by the platform-specific backing stores. This cleans up the
multi-platform aspects of the old code, and also makes it possible to create
different backing stores (such as ones in another process).

This renames the BackingStore::PaintRect function to PaintToBackingStore which
clears up what it does. I would often get confused and think that it paints
the backing store to the screen.

This makes a common way to capture backing store information and adds it to the
backing store API. This removed a bunch of ugly ifdefs.

This adds the ability for a backing store to specify that the TransportDIB
should not be freed by RenderWidgetHost when painting is complete. This is
necessary since the out-of-process version needs to use it after the
RenderWidget paint function has returned.

This pushes up the vector of copy_rect from RenderWidgetHost to the actual
BackingStores. This prevents us from sending duplicate data over IPC. It also
makes the common non-IPC case more efficient, since we end up setting up various
surfaces only once when there are multiple update rects.

BUG=none
TEST=none
Review URL: http://codereview.chromium.org/523028

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36075 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi
index d567984e..2625ca9e 100755
--- a/chrome/chrome_browser.gypi
+++ b/chrome/chrome_browser.gypi
@@ -813,6 +813,8 @@
         'browser/google_url_tracker.h',
         'browser/google_util.cc',
         'browser/google_util.h',
+        'browser/gpu_process_host.cc',
+        'browser/gpu_process_host.h',
         'browser/gtk/about_chrome_dialog.cc',
         'browser/gtk/about_chrome_dialog.h',
         'browser/gtk/back_forward_button_gtk.cc',
@@ -1327,12 +1329,18 @@
         'browser/renderer_host/async_resource_handler.h',
         'browser/renderer_host/audio_renderer_host.cc',
         'browser/renderer_host/audio_renderer_host.h',
+        'browser/renderer_host/backing_store.cc',
         'browser/renderer_host/backing_store.h',
         'browser/renderer_host/backing_store_manager.cc',
         'browser/renderer_host/backing_store_manager.h',
+        'browser/renderer_host/backing_store_mac.h',
         'browser/renderer_host/backing_store_mac.mm',
+        'browser/renderer_host/backing_store_proxy.cc',
+        'browser/renderer_host/backing_store_proxy.h',
         'browser/renderer_host/backing_store_win.cc',
+        'browser/renderer_host/backing_store_win.h',
         'browser/renderer_host/backing_store_x.cc',
+        'browser/renderer_host/backing_store_x.h',
         'browser/renderer_host/browser_render_process_host.cc',
         'browser/renderer_host/browser_render_process_host.h',
         'browser/renderer_host/buffered_resource_handler.cc',
@@ -1346,6 +1354,8 @@
         'browser/renderer_host/download_throttling_resource_handler.cc',
         'browser/renderer_host/download_throttling_resource_handler.h',
         'browser/renderer_host/global_request_id.h',
+        'browser/renderer_host/gpu_view_host_win.cc',
+        'browser/renderer_host/gpu_view_host_win.h',
         'browser/renderer_host/gtk_im_context_wrapper.cc',
         'browser/renderer_host/gtk_im_context_wrapper.h',
         'browser/renderer_host/gtk_key_bindings_handler.cc',
@@ -1921,6 +1931,8 @@
              # Windows-specific files.
             'browser/password_manager/password_store_win.cc',
             'browser/password_manager/password_store_win.h',
+            'browser/renderer_host/backing_store_proxy.cc',
+            'browser/renderer_host/backing_store_proxy.h',
           ],
           'sources': [
             'browser/crash_handler_host_linux.h',
@@ -1972,6 +1984,8 @@
             'browser/password_manager/password_store_kwallet.cc',
             'browser/password_manager/password_store_win.cc',
             'browser/password_manager/password_store_win.h',
+            'browser/renderer_host/backing_store_proxy.cc',
+            'browser/renderer_host/backing_store_proxy.h',
             'browser/views/extensions/extension_shelf.cc',
             'browser/views/extensions/extension_shelf.h',
             'browser/views/extensions/extension_view.cc',