New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 609316 link

Starred by 6 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug
mus

Blocked on:
issue 683226
issue 586364

Blocking:
issue 609317
issue 699255



Sign in to add a comment

Refactor content/browser and content/renderer to use Mus Gpu Service if Mus is running.

Project Member Reported by fsam...@chromium.org, May 4 2016

Issue description

Once the gpu/ipc service is wired into Mus, we need to use it from content instead of creating a new gpu process. If we are running with Mus, we should not be using GpuProcessHost. I was thinking maybe creating an abstract "GpuServiceProvider" interface, that Chrome talks to and behind the scenes it's either Mus or a Gpu process. In a nutshell, that interface would be responsible for creating GpuChannels, and GpuMemoryBuffers.

Note that this bug isn't entirely blocked on 586364. We can abstract away the GpuServiceProvider in Chrome code while we continue wiring the Gpu service in Mus.

WDYT?

 
Blocking: 609317
Cc: vollick@chromium.org

Comment 3 by piman@chromium.org, May 4 2016

Is it that useful to abstract? That code that creates GpuChannelHost and GpuMemoryBufferManager is already in code that isn't used by mus - e.g. in the renderer that is done inside the RenderWidgetCompositorDelegate implementation, which differs between the mus version and the content version (AIUI). Abstracting it at a lower level is only useful if we can share code, but can we?
Components: Internals>MUS
Labels: Proj-Mustash
Owner: sadrul@chromium.org
Status: Assigned (was: Untriaged)
Assigning to Sadrul. I feel like this may be out of date at this point. Feel free to mark as WontFix.

Comment 6 by sadrul@chromium.org, Jan 23 2017

Labels: -Pri-3 -mustash Proj-Mustash-Milestone-Tadpole Proj-Mustash-Mus-GPU OS-All Pri-2
I have updated chrome-renderer to use mus-gpu[*] on all platform, whether running mus or not. (crrev.com/439282)

I am currently updating chrome-gpu process to do the same (crrev.com/2612623002), where chrome-gpu will provide the impl. to chrome-browser using the mus implementation of the gpu API.

chrome-browser too will be updated to use the gpu-host implementation from mus.

*: i.e. mus implementation of the gpu API. When running in mus, the mus server provides the implementation of the API. Otherwise, chrome-browser provides the impl.
Project Member

Comment 7 by bugdroid1@chromium.org, Jul 5 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a4447c621719211e9d8624de2fe62c59f1e1384e

commit a4447c621719211e9d8624de2fe62c59f1e1384e
Author: sadrul <sadrul@chromium.org>
Date: Wed Jul 05 18:17:54 2017

vr/gpu: BrowserGpuChannelHostFactory should be called on the same thread.

MailboxToSurfaceBridge in vr code lives in the vr-gl thread. It requests
a cc::ContextProvider from content::Compositor, which in turn gets a gpu
channel from BrowserGpuChannelHostFactory. However, the factory lives in
the UI thread, and is not thread-safe. So, impose a restriction on the
factory and content::Compositor that the relevant functions can only be
called from the UI thread. Update the vr code to do the necessary thread
hopping to make sure it calls the functions on the right threads.

BUG=609316

Review-Url: https://codereview.chromium.org/2969153002
Cr-Commit-Position: refs/heads/master@{#484311}

[modify] https://crrev.com/a4447c621719211e9d8624de2fe62c59f1e1384e/chrome/browser/android/vr_shell/mailbox_to_surface_bridge.cc
[modify] https://crrev.com/a4447c621719211e9d8624de2fe62c59f1e1384e/chrome/browser/android/vr_shell/mailbox_to_surface_bridge.h
[modify] https://crrev.com/a4447c621719211e9d8624de2fe62c59f1e1384e/content/browser/gpu/browser_gpu_channel_host_factory.cc
[modify] https://crrev.com/a4447c621719211e9d8624de2fe62c59f1e1384e/content/browser/renderer_host/compositor_impl_android.cc
[modify] https://crrev.com/a4447c621719211e9d8624de2fe62c59f1e1384e/content/public/browser/android/compositor.h

Project Member

Comment 8 by bugdroid1@chromium.org, Jul 5 2017

Project Member

Comment 9 by bugdroid1@chromium.org, Jul 6 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/519814bd8b4235d2f1702ebdc306a16c5b03707f

commit 519814bd8b4235d2f1702ebdc306a16c5b03707f
Author: sadrul <sadrul@chromium.org>
Date: Thu Jul 06 17:58:30 2017

mus-gpu: Fix handling channel establish requests.

A couple of changes:
. If a request for establishing a gpu channel is made from the callback
  of a failed previous request, then make sure the request is processed
  correctly. Without this fix, |ui::Gpu::establish_callbacks_| is
  changed while iterating over it, causing errors.
. If a request for a gpu channel was successful, then the subsequent
  requests should be responded synchronously. This is the current
  behaviour of BrowserGpuChannelHostFactory.

BUG=609316

Review-Url: https://codereview.chromium.org/2968053002
Cr-Commit-Position: refs/heads/master@{#484664}

[modify] https://crrev.com/519814bd8b4235d2f1702ebdc306a16c5b03707f/services/ui/public/cpp/gpu/gpu.cc
[modify] https://crrev.com/519814bd8b4235d2f1702ebdc306a16c5b03707f/services/ui/public/cpp/tests/gpu_unittest.cc

Project Member

Comment 10 by bugdroid1@chromium.org, Jul 14 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/49c9257113c2de95b7a16506c297de1767b36931

commit 49c9257113c2de95b7a16506c297de1767b36931
Author: Sadrul Habib Chowdhury <sadrul@chromium.org>
Date: Fri Jul 14 19:17:41 2017

gpu: Retry gpu channel connection in the host.

If establishing a gpu channel fails, then it could be because access to
gpu is not allowed, in which case the client should use software fallback.
If, on the other hand, the failure happens because the gpu process was
killed, or the gpu process crashed, then the attempt to establish the
channel should be retried. But instead of retrying in the clients, retry
in the host, which has better information to know whether a retry attempt
may be successful or not.

Remove the retry logic in the renderer (in RenderWidgetCompositor), since
the host (GpuClient) will be taking care of that.

BUG=609316

Change-Id: Ibcc1d5e79f354ccb282bad2321fca26d1c06402c
Reviewed-on: https://chromium-review.googlesource.com/571490
Reviewed-by: Antoine Labour <piman@chromium.org>
Commit-Queue: Sadrul Chowdhury <sadrul@chromium.org>
Cr-Commit-Position: refs/heads/master@{#486835}
[modify] https://crrev.com/49c9257113c2de95b7a16506c297de1767b36931/content/browser/gpu/gpu_client.cc
[modify] https://crrev.com/49c9257113c2de95b7a16506c297de1767b36931/content/renderer/gpu/render_widget_compositor.cc
[modify] https://crrev.com/49c9257113c2de95b7a16506c297de1767b36931/content/renderer/gpu/render_widget_compositor.h
[modify] https://crrev.com/49c9257113c2de95b7a16506c297de1767b36931/content/renderer/gpu/render_widget_compositor_unittest.cc

Blocking: 699255
Blockedon: 683226
Components: -Internals>MUS Internals>Services>WindowService
Components: -MUS
Labels: -Proj-Mustash Proj-Mash-MultiProcess
Labels: -Proj-Mustash-Mus-GPU
Cleaning up old Proj-Mustash labels.

Sign in to add a comment