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

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

Issue 2624633002: Remove Sync GetPose VRService call, implement VRVSyncProvider (Closed)
Patch Set: oops Created 3 years, 11 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
« no previous file with comments | « chrome/browser/android/vr_shell/vr_gl_thread.h ('k') | chrome/browser/android/vr_shell/vr_shell.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/vr_shell/vr_gl_thread.cc
diff --git a/chrome/browser/android/vr_shell/vr_gl_thread.cc b/chrome/browser/android/vr_shell/vr_gl_thread.cc
new file mode 100644
index 0000000000000000000000000000000000000000..ff4aa923b96a331198e85cf753578f02b7e8898b
--- /dev/null
+++ b/chrome/browser/android/vr_shell/vr_gl_thread.cc
@@ -0,0 +1,47 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/android/vr_shell/vr_gl_thread.h"
+
+#include "chrome/browser/android/vr_shell/vr_input_manager.h"
+#include "chrome/browser/android/vr_shell/vr_shell.h"
+#include "chrome/browser/android/vr_shell/vr_shell_gl.h"
+
+namespace vr_shell {
+
+VrGLThread::VrGLThread(
+ const base::WeakPtr<VrShell>& weak_vr_shell,
+ const base::WeakPtr<VrShellDelegate>& delegate_provider,
+ scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner,
+ gvr_context* gvr_api,
+ bool initially_web_vr,
+ bool reprojected_rendering)
+ : base::Thread("VrShellGL"),
+ weak_vr_shell_(weak_vr_shell),
+ delegate_provider_(delegate_provider),
+ main_thread_task_runner_(std::move(main_thread_task_runner)),
+ gvr_api_(gvr_api),
+ initially_web_vr_(initially_web_vr),
+ reprojected_rendering_(reprojected_rendering) {}
+
+VrGLThread::~VrGLThread() {
+ Stop();
+}
+
+void VrGLThread::Init() {
+ vr_shell_gl_.reset(new VrShellGl(std::move(weak_vr_shell_),
+ std::move(delegate_provider_),
+ std::move(main_thread_task_runner_),
+ gvr_api_,
+ initially_web_vr_,
+ reprojected_rendering_));
+ weak_vr_shell_gl_ = vr_shell_gl_->GetWeakPtr();
+ vr_shell_gl_->Initialize();
+}
+
+void VrGLThread::CleanUp() {
+ vr_shell_gl_.reset();
+}
+
+} // namespace vr_shell
« no previous file with comments | « chrome/browser/android/vr_shell/vr_gl_thread.h ('k') | chrome/browser/android/vr_shell/vr_shell.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698