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

Issue 2658643003: Refactor GvrDelegate ownership into GvrDelegateProvider and fix more threading violations. (Closed)

Created:
3 years, 11 months ago by mthiesse
Modified:
3 years, 10 months ago
Reviewers:
bajones, cjgrant
CC:
chromium-reviews, feature-vr-reviews_chromium.org, klausw
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Refactor GvrDelegate ownership into GvrDelegateProvider and fix more threading violations. This CL does two main things: It refactors controlling when the GvrDelegate is created and destroyed into the GvrDelegateProvider, and it refactors out some instances of using the GVR api in a non-threadsafe way. Some minor functional changes may be visible with this patch - namely that we no longer (possibly) send a DisplayConnected event for a display that isn't ready yet due to the gvr api not being available. This should be an improvement in all cases. BUG=674594, 655297 Review-Url: https://codereview.chromium.org/2658643003 Cr-Commit-Position: refs/heads/master@{#447643} Committed: https://chromium.googlesource.com/chromium/src/+/4c6465c3b85e664ca700e1c04bebf637c7846243

Patch Set 1 #

Patch Set 2 : cleanup #

Total comments: 8

Patch Set 3 : rebase #

Patch Set 4 : Address comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+331 lines, -374 lines) Patch
M chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShellDelegate.java View 1 2 3 1 chunk +0 lines, -3 lines 0 comments Download
M chrome/browser/android/vr_shell/BUILD.gn View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/android/vr_shell/non_presenting_gvr_delegate.h View 3 chunks +7 lines, -4 lines 0 comments Download
M chrome/browser/android/vr_shell/non_presenting_gvr_delegate.cc View 1 2 3 chunks +21 lines, -10 lines 0 comments Download
M chrome/browser/android/vr_shell/vr_compositor.h View 1 2 2 chunks +0 lines, -2 lines 0 comments Download
M chrome/browser/android/vr_shell/vr_compositor.cc View 1 2 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/android/vr_shell/vr_gl_thread.h View 1 2 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/android/vr_shell/vr_shell.h View 1 2 3 3 chunks +14 lines, -3 lines 0 comments Download
M chrome/browser/android/vr_shell/vr_shell.cc View 1 2 3 8 chunks +70 lines, -22 lines 0 comments Download
M chrome/browser/android/vr_shell/vr_shell_delegate.h View 1 2 3 3 chunks +11 lines, -4 lines 0 comments Download
M chrome/browser/android/vr_shell/vr_shell_delegate.cc View 1 5 chunks +54 lines, -31 lines 0 comments Download
M chrome/browser/android/vr_shell/vr_shell_gl.h View 1 2 2 chunks +4 lines, -1 line 0 comments Download
M chrome/browser/android/vr_shell/vr_shell_gl.cc View 1 2 3 chunks +23 lines, -4 lines 0 comments Download
M device/vr/android/gvr/gvr_delegate.h View 3 chunks +7 lines, -10 lines 0 comments Download
M device/vr/android/gvr/gvr_device.h View 2 chunks +6 lines, -11 lines 0 comments Download
M device/vr/android/gvr/gvr_device.cc View 4 chunks +38 lines, -146 lines 0 comments Download
M device/vr/android/gvr/gvr_device_provider.h View 2 chunks +2 lines, -12 lines 0 comments Download
M device/vr/android/gvr/gvr_device_provider.cc View 1 chunk +16 lines, -76 lines 0 comments Download
M device/vr/android/gvr/gvr_gamepad_data_fetcher.h View 1 chunk +5 lines, -6 lines 0 comments Download
M device/vr/android/gvr/gvr_gamepad_data_fetcher.cc View 2 chunks +14 lines, -11 lines 0 comments Download
M device/vr/test/fake_vr_device.h View 1 chunk +3 lines, -1 line 0 comments Download
M device/vr/test/fake_vr_device.cc View 1 chunk +3 lines, -2 lines 0 comments Download
M device/vr/vr_device.h View 3 chunks +6 lines, -1 line 0 comments Download
M device/vr/vr_device.cc View 2 chunks +12 lines, -6 lines 0 comments Download
M device/vr/vr_display_impl.h View 1 chunk +2 lines, -0 lines 0 comments Download
M device/vr/vr_display_impl.cc View 1 chunk +11 lines, -5 lines 0 comments Download

Messages

Total messages: 15 (7 generated)
mthiesse
PTAL
3 years, 11 months ago (2017-01-25 20:55:45 UTC) #2
mthiesse
cc klaus, FYI.
3 years, 11 months ago (2017-01-25 21:36:12 UTC) #5
cjgrant
A couple of nit-grade comments only... https://codereview.chromium.org/2658643003/diff/20001/chrome/browser/android/vr_shell/vr_shell.cc File chrome/browser/android/vr_shell/vr_shell.cc (right): https://codereview.chromium.org/2658643003/diff/20001/chrome/browser/android/vr_shell/vr_shell.cc#newcode481 chrome/browser/android/vr_shell/vr_shell.cc:481: gvr::BufferViewport eye_viewport = ...
3 years, 11 months ago (2017-01-25 21:45:32 UTC) #7
mthiesse
https://codereview.chromium.org/2658643003/diff/20001/chrome/browser/android/vr_shell/vr_shell.cc File chrome/browser/android/vr_shell/vr_shell.cc (right): https://codereview.chromium.org/2658643003/diff/20001/chrome/browser/android/vr_shell/vr_shell.cc#newcode481 chrome/browser/android/vr_shell/vr_shell.cc:481: gvr::BufferViewport eye_viewport = gvr_api->CreateBufferViewport(); On 2017/01/25 21:45:31, cjgrant wrote: ...
3 years, 10 months ago (2017-01-30 19:47:26 UTC) #8
mthiesse
ping bajones, PTAL
3 years, 10 months ago (2017-01-31 15:17:56 UTC) #9
bajones
On 2017/01/31 15:17:56, mthiesse wrote: > ping bajones, PTAL LGTM
3 years, 10 months ago (2017-02-01 22:20:33 UTC) #10
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/2658643003/60001
3 years, 10 months ago (2017-02-01 22:21:47 UTC) #12
commit-bot: I haz the power
3 years, 10 months ago (2017-02-01 23:41:03 UTC) #15
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as
https://chromium.googlesource.com/chromium/src/+/4c6465c3b85e664ca700e1c04beb...

Powered by Google App Engine
This is Rietveld 408576698