Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(373)

Issue 7054005: Fix gpu acceleration with --in-process-gpu (Closed)

Created:
9 years, 7 months ago by Daniel Sievers (Google)
Modified:
9 years, 7 months ago
CC:
chromium-reviews, brettw-cc_chromium.org, Nat, jbates
Visibility:
Public.

Description

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. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=86958

Patch Set 1 #

Patch Set 2 : merged GpuBrowserHost and GpuHostDelegate into GpuMessageHub #

Patch Set 3 : clean up GpuMessageHub Send() interface #

Patch Set 4 : cleanup #

Total comments: 4

Patch Set 5 : address comments, fix leak with RouteToGpuProcessHostUIShimTask #

Patch Set 6 : new approach: instantiate GpuProcessHost even in gpu-thread mode #

Patch Set 7 : remove obsolete files #

Total comments: 4

Patch Set 8 : address comments #

Patch Set 9 : Make --single-process mode work too #

Total comments: 1

Patch Set 10 : rebase #

Patch Set 11 : virtual ~RouteToGpuProcessHostUIShimTask() #

Patch Set 12 : add comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+103 lines, -173 lines) Patch
M chrome/browser/browser_process.h View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -3 lines 0 comments Download
M chrome/browser/browser_process_impl.h View 1 2 3 4 5 6 7 8 9 2 chunks +0 lines, -4 lines 0 comments Download
M chrome/browser/browser_process_impl.cc View 1 2 3 4 5 6 7 8 9 4 chunks +0 lines, -32 lines 0 comments Download
M chrome/test/testing_browser_process.h View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -2 lines 0 comments Download
M chrome/test/testing_browser_process.cc View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -4 lines 0 comments Download
M content/browser/browser_thread.h View 1 2 3 4 5 1 chunk +0 lines, -3 lines 0 comments Download
M content/browser/browser_thread.cc View 1 2 3 4 5 1 chunk +0 lines, -1 line 0 comments Download
M content/browser/gpu/gpu_process_host.h View 1 2 3 4 5 6 7 2 chunks +8 lines, -0 lines 0 comments Download
M content/browser/gpu/gpu_process_host.cc View 1 2 3 4 5 6 7 8 7 chunks +85 lines, -28 lines 0 comments Download
M content/browser/gpu/gpu_process_host_ui_shim.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +1 line, -13 lines 0 comments Download
M content/browser/gpu/gpu_process_host_ui_shim.cc View 1 2 3 4 5 6 chunks +4 lines, -82 lines 0 comments Download
M content/gpu/gpu_child_thread.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +5 lines, -1 line 0 comments Download

Messages

Total messages: 14 (0 generated)
Daniel Sievers (Google)
Maybe if I merge the code from GpuHostDelegate into GpuBrowserHost and then rename that class ...
9 years, 7 months ago (2011-05-20 17:08:43 UTC) #1
apatrick_chromium
On 2011/05/20 17:08:43, Daniel Sievers wrote: > Maybe if I merge the code from GpuHostDelegate ...
9 years, 7 months ago (2011-05-20 18:22:25 UTC) #2
apatrick_chromium
LGTM http://codereview.chromium.org/7054005/diff/5001/content/browser/gpu/gpu_thread_host.cc File content/browser/gpu/gpu_thread_host.cc (right): http://codereview.chromium.org/7054005/diff/5001/content/browser/gpu/gpu_thread_host.cc#newcode36 content/browser/gpu/gpu_thread_host.cc:36: : message_hub_(browser_host) { } drop } to next ...
9 years, 7 months ago (2011-05-23 22:01:33 UTC) #3
jam
I didn't look closely at this, but I had one question: as I understand it, ...
9 years, 7 months ago (2011-05-23 22:19:44 UTC) #4
jam
also a small nit: there's no reason for BUG= TEST= only add either of these ...
9 years, 7 months ago (2011-05-23 22:36:27 UTC) #5
Daniel Sievers (Google)
New version uploaded according to John's idea. This works for --in-process-gpu, but needs more work ...
9 years, 7 months ago (2011-05-26 00:53:01 UTC) #6
jam
http://codereview.chromium.org/7054005/diff/12001/content/browser/gpu/gpu_process_host.cc File content/browser/gpu/gpu_process_host.cc (right): http://codereview.chromium.org/7054005/diff/12001/content/browser/gpu/gpu_process_host.cc#newcode140 content/browser/gpu/gpu_process_host.cc:140: DCHECK(!GpuProcess::current()); what happens if someone uses --single-process mode now? ...
9 years, 7 months ago (2011-05-26 01:15:24 UTC) #7
Daniel Sievers (Google)
+avi ** Presubmit ERRORS ** Missing LGTM from an OWNER for: content/browser/browser_thread.h,content/browser/browser_thread.cc http://codereview.chromium.org/7054005/diff/12001/content/browser/gpu/gpu_process_host.cc File content/browser/gpu/gpu_process_host.cc ...
9 years, 7 months ago (2011-05-26 01:35:09 UTC) #8
jam
On 2011/05/26 01:35:09, Daniel Sievers wrote: > +avi > > ** Presubmit ERRORS ** > ...
9 years, 7 months ago (2011-05-26 04:46:51 UTC) #9
jam
lgtm after you address the comment re the dcheck (note i'm in the owners file ...
9 years, 7 months ago (2011-05-26 04:50:00 UTC) #10
Daniel Sievers (Google)
Ok, I changed the DCHECK() and actually was able to make --single-process mode work even ...
9 years, 7 months ago (2011-05-26 19:09:08 UTC) #11
jam
lgtm http://codereview.chromium.org/7054005/diff/18002/content/gpu/gpu_child_thread.cc File content/gpu/gpu_child_thread.cc (right): http://codereview.chromium.org/7054005/diff/18002/content/gpu/gpu_child_thread.cc#newcode119 content/gpu/gpu_child_thread.cc:119: if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kSingleProcess)) can you please add a comment ...
9 years, 7 months ago (2011-05-26 22:03:54 UTC) #12
commit-bot: I haz the power
Try job failure for 7054005-23002 on linux: http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux&number=29000
9 years, 7 months ago (2011-05-26 22:35:32 UTC) #13
commit-bot: I haz the power
9 years, 7 months ago (2011-05-27 03:18:38 UTC) #14
Change committed as 86958

Powered by Google App Engine
This is Rietveld 408576698