OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/android/vr_shell/vr_shell.h" | 5 #include "chrome/browser/android/vr_shell/vr_shell.h" |
6 | 6 |
7 #include <thread> | 7 #include <thread> |
8 | 8 |
| 9 #include "chrome/browser/android/vr_shell/vr_gl_util.h" |
| 10 #include "chrome/browser/android/vr_shell/vr_math.h" |
9 #include "chrome/browser/android/vr_shell/vr_shell_renderer.h" | 11 #include "chrome/browser/android/vr_shell/vr_shell_renderer.h" |
10 #include "chrome/browser/android/vr_shell/vr_util.h" | |
11 #include "jni/VrShell_jni.h" | 12 #include "jni/VrShell_jni.h" |
12 #include "ui/gl/gl_bindings.h" | 13 #include "ui/gl/gl_bindings.h" |
13 #include "ui/gl/init/gl_factory.h" | 14 #include "ui/gl/init/gl_factory.h" |
14 | 15 |
15 using base::android::JavaParamRef; | 16 using base::android::JavaParamRef; |
16 | 17 |
17 namespace { | 18 namespace { |
18 // Constant taken from treasure_hunt demo. | 19 // Constant taken from treasure_hunt demo. |
19 static constexpr long kPredictionTimeWithoutVsyncNanos = 50000000; | 20 static constexpr long kPredictionTimeWithoutVsyncNanos = 50000000; |
20 | 21 |
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
319 | 320 |
320 // ---------------------------------------------------------------------------- | 321 // ---------------------------------------------------------------------------- |
321 // Native JNI methods | 322 // Native JNI methods |
322 // ---------------------------------------------------------------------------- | 323 // ---------------------------------------------------------------------------- |
323 | 324 |
324 jlong Init(JNIEnv* env, const JavaParamRef<jobject>& obj) { | 325 jlong Init(JNIEnv* env, const JavaParamRef<jobject>& obj) { |
325 return reinterpret_cast<intptr_t>(new VrShell(env, obj)); | 326 return reinterpret_cast<intptr_t>(new VrShell(env, obj)); |
326 } | 327 } |
327 | 328 |
328 } // namespace vr_shell | 329 } // namespace vr_shell |
OLD | NEW |