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

Issue 2969153002: vr/gpu: BrowserGpuChannelHostFactory should be called on the same thread. (Closed)

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

Description

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/+/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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+58 lines, -29 lines) Patch
M chrome/browser/android/vr_shell/mailbox_to_surface_bridge.h View 1 2 3 4 2 chunks +3 lines, -1 line 0 comments Download
M chrome/browser/android/vr_shell/mailbox_to_surface_bridge.cc View 1 2 3 4 5 3 chunks +51 lines, -27 lines 0 comments Download
M content/browser/gpu/browser_gpu_channel_host_factory.cc View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/renderer_host/compositor_impl_android.cc View 1 2 chunks +2 lines, -0 lines 0 comments Download
M content/public/browser/android/compositor.h View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 43 (33 generated)
sadrul
+mthiesse@ for chrome/ change. +piman@ for content/ changes. Thanks!
3 years, 5 months ago (2017-07-05 04:59:38 UTC) #15
mthiesse
lgtm https://codereview.chromium.org/2969153002/diff/100001/chrome/browser/android/vr_shell/mailbox_to_surface_bridge.cc File chrome/browser/android/vr_shell/mailbox_to_surface_bridge.cc (right): https://codereview.chromium.org/2969153002/diff/100001/chrome/browser/android/vr_shell/mailbox_to_surface_bridge.cc#newcode189 chrome/browser/android/vr_shell/mailbox_to_surface_bridge.cc:189: weak_ptr_factory_.GetWeakPtr(), base::Passed(&surface)); Are we just passing this surface ...
3 years, 5 months ago (2017-07-05 14:45:40 UTC) #26
bshe
I had a similar fix (https://chromium-review.googlesource.com/c/558397/) but everything is called on GL thread instead of ...
3 years, 5 months ago (2017-07-05 14:56:35 UTC) #28
bshe
3 years, 5 months ago (2017-07-05 14:57:00 UTC) #29
bshe
On 2017/07/05 14:57:00, bshe wrote: This is a better fix. I will rebase on your ...
3 years, 5 months ago (2017-07-05 15:00:53 UTC) #30
sadrul
https://codereview.chromium.org/2969153002/diff/100001/chrome/browser/android/vr_shell/mailbox_to_surface_bridge.cc File chrome/browser/android/vr_shell/mailbox_to_surface_bridge.cc (right): https://codereview.chromium.org/2969153002/diff/100001/chrome/browser/android/vr_shell/mailbox_to_surface_bridge.cc#newcode189 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 ...
3 years, 5 months ago (2017-07-05 15:05:41 UTC) #33
sadrul
On 2017/07/05 15:00:53, bshe wrote: > On 2017/07/05 14:57:00, bshe wrote: > > This is ...
3 years, 5 months ago (2017-07-05 15:11:25 UTC) #34
piman
content/ LGTM
3 years, 5 months ago (2017-07-05 17:46:52 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2969153002/120001
3 years, 5 months ago (2017-07-05 18:10:26 UTC) #40
commit-bot: I haz the power
3 years, 5 months ago (2017-07-05 18:18:18 UTC) #43
Message was sent while issue was closed.
Committed patchset #6 (id:120001) as
https://chromium.googlesource.com/chromium/src/+/a4447c621719211e9d8624de2fe6...

Powered by Google App Engine
This is Rietveld 408576698