|
|
Chromium Code Reviews
Descriptionvr/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}
Committed: https://chromium.googlesource.com/chromium/src/+/a4447c621719211e9d8624de2fe62c59f1e1384e
Patch Set 1 : . #Patch Set 2 : fix vr #Patch Set 3 : self nit #Patch Set 4 : . #Patch Set 5 : . #
Total comments: 2
Patch Set 6 : comment #
Messages
Total messages: 43 (33 generated)
The CQ bit was checked by sadrul@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was checked by sadrul@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: android_clang_dbg_recipe on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_clan...)
The CQ bit was checked by sadrul@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by sadrul@chromium.org
Description was changed from ========== exp: BrowserGpuChannelHostFactory should be called on the same thread. ... BUG=... ========== to ========== 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 ==========
The CQ bit was checked by sadrul@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Patchset #1 (id:1) has been deleted
sadrul@chromium.org changed reviewers: + mthiesse@chromium.org, piman@chromium.org
+mthiesse@ for chrome/ change. +piman@ for content/ changes. Thanks!
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: android_n5x_swarming_rel on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_n5x_...)
The CQ bit was checked by sadrul@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: android_n5x_swarming_rel on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_n5x_...)
The CQ bit was checked by sadrul@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
lgtm https://codereview.chromium.org/2969153002/diff/100001/chrome/browser/android... File chrome/browser/android/vr_shell/mailbox_to_surface_bridge.cc (right): https://codereview.chromium.org/2969153002/diff/100001/chrome/browser/android... chrome/browser/android/vr_shell/mailbox_to_surface_bridge.cc:189: weak_ptr_factory_.GetWeakPtr(), base::Passed(&surface)); Are we just passing this surface to keep it alive? If so, please add a comment to this effect as it looks unused and somebody might remove it later :P
bshe@chromium.org changed reviewers: + bshe@chromium.org
I had a similar fix (https://chromium-review.googlesource.com/c/558397/) but everything is called on GL thread instead of UI thread (I am under the impression that it should all live on GL thread). +cc klausw@
On 2017/07/05 14:57:00, bshe wrote: This is a better fix. I will rebase on your patch. :)
The CQ bit was checked by sadrul@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
https://codereview.chromium.org/2969153002/diff/100001/chrome/browser/android... File chrome/browser/android/vr_shell/mailbox_to_surface_bridge.cc (right): https://codereview.chromium.org/2969153002/diff/100001/chrome/browser/android... chrome/browser/android/vr_shell/mailbox_to_surface_bridge.cc:189: weak_ptr_factory_.GetWeakPtr(), base::Passed(&surface)); On 2017/07/05 14:45:40, mthiesse wrote: > Are we just passing this surface to keep it alive? If so, please add a comment > to this effect as it looks unused and somebody might remove it later :P Yep, good point. Added a comment.
On 2017/07/05 15:00:53, bshe wrote: > On 2017/07/05 14:57:00, bshe wrote: > > This is a better fix. I will rebase on your patch. :) Cool, thanks!
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
content/ LGTM
The CQ bit was checked by sadrul@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from mthiesse@chromium.org Link to the patchset: https://codereview.chromium.org/2969153002/#ps120001 (title: "comment")
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch.
Bot data: {"patchset_id": 120001, "attempt_start_ts": 1499278207126590,
"parent_rev": "d92f0f004dbc7afb8fe78436b8caf9e98012f06c", "commit_rev":
"a4447c621719211e9d8624de2fe62c59f1e1384e"}
Message was sent while issue was closed.
Description was changed from ========== 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 ========== to ========== 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} Committed: https://chromium.googlesource.com/chromium/src/+/a4447c621719211e9d8624de2fe6... ==========
Message was sent while issue was closed.
Committed patchset #6 (id:120001) as https://chromium.googlesource.com/chromium/src/+/a4447c621719211e9d8624de2fe6... |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
