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

Unified Diff: chrome/browser/android/vr_shell/vr_shell.h

Issue 2319863005: Implement new compositor and ContentViewCore reparenting for VR Shell. (Closed)
Patch Set: Created 4 years, 3 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.h
diff --git a/chrome/browser/android/vr_shell/vr_shell.h b/chrome/browser/android/vr_shell/vr_shell.h
index c06826eafa46bb16d94d3c7406cd9fbdf6f20b10..3bd463cda019601f25117e1b6e28b9a6a7dbb028 100644
--- a/chrome/browser/android/vr_shell/vr_shell.h
+++ b/chrome/browser/android/vr_shell/vr_shell.h
@@ -11,10 +11,18 @@
#include "base/android/jni_weak_ref.h"
#include "base/macros.h"
+#include "chrome/browser/android/vr_shell/simple_compositor_view.h"
#include "chrome/browser/android/vr_shell/ui_elements.h"
#include "third_party/gvr-android-sdk/src/ndk-beta/include/vr/gvr/capi/include/gvr.h"
#include "third_party/gvr-android-sdk/src/ndk-beta/include/vr/gvr/capi/include/gvr_types.h"
+namespace content {
+class ContentViewCore;
+}
+
+namespace ui {
+class WindowAndroid;
+}
namespace vr_shell {
@@ -22,8 +30,12 @@ class VrShellRenderer;
class VrShell {
public:
- VrShell(JNIEnv* env, jobject obj);
+ VrShell(JNIEnv* env, jobject obj,
+ content::ContentViewCore* content_core,
+ ui::WindowAndroid* content_window);
+ void UpdateCompositorLayers(JNIEnv* env,
+ const base::android::JavaParamRef<jobject>& obj);
void Destroy(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj);
void GvrInit(JNIEnv* env,
const base::android::JavaParamRef<jobject>& obj,
@@ -35,6 +47,20 @@ class VrShell {
void OnPause(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj);
void OnResume(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj);
+ void ContentSurfaceCreated(
+ JNIEnv* env,
+ const base::android::JavaParamRef<jobject>& object);
+ void ContentSurfaceDestroyed(
+ JNIEnv* env,
+ const base::android::JavaParamRef<jobject>& object);
+ void ContentSurfaceChanged(
+ JNIEnv* env,
+ const base::android::JavaParamRef<jobject>& object,
+ jint format,
+ jint width,
+ jint height,
+ const base::android::JavaParamRef<jobject>& surface);
+
private:
~VrShell();
void DrawEye(const gvr::Mat4f& view_matrix,
@@ -68,6 +94,9 @@ class VrShell {
gvr::Sizei render_size_;
+ std::unique_ptr<SimpleCompositorView> content_compositor_view_;
+ content::ContentViewCore* content_core_;
+
std::unique_ptr<VrShellRenderer> vr_shell_renderer_;
base::android::ScopedJavaGlobalRef<jobject> j_vr_shell_;

Powered by Google App Engine
This is Rietveld 408576698