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

Unified Diff: chrome/browser/android/vr_shell/vr_shell_gl.cc

Issue 2809143004: VR: Add a native UI element scene manager (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/android/vr_shell/vr_shell_gl.cc
diff --git a/chrome/browser/android/vr_shell/vr_shell_gl.cc b/chrome/browser/android/vr_shell/vr_shell_gl.cc
index 644b8ecc88b0b88ea1290fb9b7a482bccdbffe9f..e6707c11bd8384554750791e9b3620033836a15e 100644
--- a/chrome/browser/android/vr_shell/vr_shell_gl.cc
+++ b/chrome/browser/android/vr_shell/vr_shell_gl.cc
@@ -140,8 +140,10 @@ VrShellGl::VrShellGl(
scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner,
gvr_context* gvr_api,
bool initially_web_vr,
- bool reprojected_rendering)
- : web_vr_mode_(initially_web_vr),
+ bool reprojected_rendering,
+ UiScene* scene)
+ : scene_(scene),
+ web_vr_mode_(initially_web_vr),
surfaceless_rendering_(reprojected_rendering),
task_runner_(base::ThreadTaskRunnerHandle::Get()),
binding_(this),
@@ -171,8 +173,6 @@ VrShellGl::~VrShellGl() {
}
void VrShellGl::Initialize() {
- scene_ = base::MakeUnique<UiScene>();
-
if (surfaceless_rendering_) {
// If we're rendering surfaceless, we'll never get a java surface to render
// into, so we can initialize GL right away.
@@ -1247,10 +1247,6 @@ void VrShellGl::ForceExitVr() {
FROM_HERE, base::Bind(&VrShell::ForceExitVr, weak_vr_shell_));
}
-void VrShellGl::UpdateScene(std::unique_ptr<base::ListValue> commands) {
- scene_->HandleCommands(std::move(commands), base::TimeTicks::Now());
-}
-
void VrShellGl::SendVSync(base::TimeDelta time,
const GetVSyncCallback& callback) {
uint8_t frame_index = frame_index_++;
« chrome/browser/android/vr_shell/vr_shell.cc ('K') | « chrome/browser/android/vr_shell/vr_shell_gl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698