From 2d9de41157f132b521b3acaa906a2256d451fda9 Mon Sep 17 00:00:00 2001
From: "sievers@google.com"
 <sievers@google.com@0039d316-1c4b-4281-b951-d872f2087c98>
Date: Fri, 27 May 2011 03:18:36 +0000
Subject: Fix gpu acceleration with --in-process-gpu and --single-process
 modes.

With recent changes that have moved gpu message handling in the browser to the IO thread (and moved the handling of messages between gpu and renderer, that are mediated by the browser, to GpuProcessHost), the routing for such messages was broken when running the gpu thread (rather than process).

The new approach is to always instantiate GpuProcessHost (even when running a gpu thread only) and have a real IPC channel between host and gpu thread. This makes the 'in-process' GPU code work similar to what the renderer does when running --single-process.

Note that --single-process mode is potentially still a bit fragile with this, since ChildProcess and ChildThread are currently written to only allow a single static instance in one process (it would be better to instantiate GpuProcess and RenderProcess simultaneously), so ambiguous calls to access e.g. the main thread are possible.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86958 0039d316-1c4b-4281-b951-d872f2087c98
---
 chrome/browser/browser_process_impl.h | 4 ----
 1 file changed, 4 deletions(-)

(limited to 'chrome/browser/browser_process_impl.h')

diff --git a/chrome/browser/browser_process_impl.h b/chrome/browser/browser_process_impl.h
index 6274747..6e0def3 100644
--- a/chrome/browser/browser_process_impl.h
+++ b/chrome/browser/browser_process_impl.h
@@ -55,7 +55,6 @@ class BrowserProcessImpl : public BrowserProcess,
   virtual base::Thread* db_thread();
   virtual base::Thread* process_launcher_thread();
   virtual base::Thread* cache_thread();
-  virtual base::Thread* gpu_thread();
 #if defined(USE_X11)
   virtual base::Thread* background_x11_thread();
 #endif
@@ -190,9 +189,6 @@ class BrowserProcessImpl : public BrowserProcess,
   bool created_cache_thread_;
   scoped_ptr<base::Thread> cache_thread_;
 
-  bool created_gpu_thread_;
-  scoped_ptr<base::Thread> gpu_thread_;
-
   bool created_watchdog_thread_;
   scoped_ptr<WatchDogThread> watchdog_thread_;
 
-- 
cgit v1.1