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

Issue 2289553002: gpu: Introduce GpuInit. (Closed)

Created:
4 years, 3 months ago by sadrul
Modified:
4 years, 3 months ago
Reviewers:
piman
CC:
chromium-reviews, jam, darin-cc_chromium.org, piman+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

gpu: Introduce GpuInit. Consolidate the GPU initialization code into GpuInit, so that the same initialization code can be used in chrome, and mus. Notable changes: . Introduce GpuInit with the core initialization code. GpuInitDelegate can be injected to define service-specific code. The service specific code handles initialization of various components (e.g. sandbox, message loop, gl etc.) . The relevant switches move out of content into //gpu/config. . Introduce GpuMain in //services/ui, which uses the gpu::GpuInit to set up the GPU process. BUG=643746 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel

Patch Set 1 #

Patch Set 2 : . #

Patch Set 3 : . #

Patch Set 4 : . #

Patch Set 5 : . #

Patch Set 6 : . #

Patch Set 7 : . #

Patch Set 8 : . #

Patch Set 9 : . #

Patch Set 10 : . #

Patch Set 11 : . #

Patch Set 12 : . #

Patch Set 13 : . #

Patch Set 14 : . #

Patch Set 15 : . #

Patch Set 16 : . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+762 lines, -451 lines) Patch
M content/gpu/gpu_child_thread.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +3 lines, -4 lines 0 comments Download
M content/gpu/gpu_child_thread.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +6 lines, -12 lines 0 comments Download
M content/gpu/gpu_main.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 5 chunks +127 lines, -366 lines 0 comments Download
M content/public/common/content_switches.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +0 lines, -7 lines 0 comments Download
M content/public/common/content_switches.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +0 lines, -22 lines 0 comments Download
M gpu/config/gpu_switches.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +8 lines, -1 line 0 comments Download
M gpu/config/gpu_switches.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +24 lines, -2 lines 0 comments Download
M gpu/ipc/service/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +4 lines, -0 lines 0 comments Download
A gpu/ipc/service/gpu_init.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +41 lines, -0 lines 0 comments Download
A gpu/ipc/service/gpu_init.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +352 lines, -0 lines 0 comments Download
A gpu/ipc/service/gpu_init_delegate.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +50 lines, -0 lines 0 comments Download
M gpu/ipc/service/gpu_watchdog_thread.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +2 lines, -1 line 0 comments Download
M services/ui/gpu/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +2 lines, -0 lines 0 comments Download
A services/ui/gpu/gpu_main.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +54 lines, -0 lines 0 comments Download
A services/ui/gpu/gpu_main.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +66 lines, -0 lines 0 comments Download
M services/ui/gpu/gpu_service_internal.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 6 chunks +10 lines, -14 lines 0 comments Download
M services/ui/gpu/gpu_service_internal.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 6 chunks +7 lines, -17 lines 0 comments Download
M services/ui/ws/DEPS View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -2 lines 0 comments Download
M services/ui/ws/gpu_service_proxy.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +2 lines, -0 lines 0 comments Download
M services/ui/ws/gpu_service_proxy.cc View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +2 lines, -3 lines 0 comments Download

Messages

Total messages: 67 (62 generated)
sadrul
4 years, 3 months ago (2016-09-02 17:57:48 UTC) #60
sadrul
(PS: I have been working on this CL for a few days, so have accumulated ...
4 years, 3 months ago (2016-09-02 18:17:53 UTC) #62
piman
I'm not super excited about this: - it certainly makes the code harder to follow, ...
4 years, 3 months ago (2016-09-02 20:58:05 UTC) #65
sadrul
On 2016/09/02 20:58:05, piman wrote: > I'm not super excited about this: > - it ...
4 years, 3 months ago (2016-09-09 02:56:32 UTC) #66
sadrul
4 years, 3 months ago (2016-09-09 02:57:35 UTC) #67
Message was sent while issue was closed.
On 2016/09/09 02:56:32, sadrul wrote:
> On 2016/09/02 20:58:05, piman wrote:
> > I'm not super excited about this:
> > - it certainly makes the code harder to follow, because it keeps hopping
back
> > and forth between gpu_init.cc and gpu_main.cc. It'll be even worse when
there
> > are 2 fully functional implementations (Mus's)
> > - in particular I don't feel like GpuInitDelegate is based on principled,
> > well-defined, initialization stages. It's not clear when each function is
> > called, what its responsibilities and constraints are, and I'm afraid it's
> only
> > going to grow and become even more complex as Mus's requirements become more
> > evident.
> > - I'm not convinced all the code in GpuInit belongs there. A lot has to do
> with
> > process initialization, whereas it is called from deep inside the
> > GpuServiceProxy constructor, and it is certainly very unexpected that it
> would:
> >   - open a dialog box to let you attach a debugger
> >   - change thread priorities
> >   - change the logging function (which is more than likely racy if other
> threads
> > are present)
> >   - change X11 error handlers
> >   - change the command line
> >   - initialize the PRNG, UMA, etc.
> >   etc.
> > - it moves more things into an arguable place. kDisableGpuWatchdog and
> > kGpuStartupDialog certainly don't belong in gpu/config. A lot of GpuInit
> doesn't
> > make much sense in gpu/ipc.
> > 
> > 
> > I feel we would be better served by carving specific pieces of functionality
> > that we want to share, and move those to individual functions, that can be
> > called both from content::GpuMain and from the mus code.
> 
> I have put up a second CL (https://codereview.chromium.org/2322123002/) that
> address most of your concerns. We still do have a delegate, but it is only
used
> to set-up the sandbox. I am closing this CL for now, and we can continue the
> discussion in the new CL.

Actually, I probably should've just put up the new patch in this CL ... let me
know if you would prefer that instead.

Powered by Google App Engine
This is Rietveld 408576698