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

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

Issue 2319863005: Implement new compositor and ContentViewCore reparenting for VR Shell. (Closed)
Patch Set: Rebase onto ToT 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
« no previous file with comments | « chrome/browser/android/vr_shell/vr_compositor.cc ('k') | chrome/browser/android/vr_shell/vr_shell.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 ef87907e74895a62e2995bf69d3624511b54b0ae..8ad2e044a44c0ad6da5aaa0dfeffe49bb63aa6fc 100644
--- a/chrome/browser/android/vr_shell/vr_shell.h
+++ b/chrome/browser/android/vr_shell/vr_shell.h
@@ -16,16 +16,28 @@
#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 {
+class VrCompositor;
class VrShellRenderer;
class VrShell : public device::GvrDelegate {
public:
- VrShell(JNIEnv* env, jobject obj);
+ VrShell(JNIEnv* env, jobject obj,
+ content::ContentViewCore* content_view_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,
@@ -45,6 +57,16 @@ class VrShell : public device::GvrDelegate {
int eye, float left, float top, float width, float height) override;
gvr::GvrApi* gvr_api() override;
+ void ContentSurfaceDestroyed(
+ JNIEnv* env,
+ const base::android::JavaParamRef<jobject>& object);
+ void ContentSurfaceChanged(
+ JNIEnv* env,
+ const base::android::JavaParamRef<jobject>& object,
+ jint width,
+ jint height,
+ const base::android::JavaParamRef<jobject>& surface);
+
private:
virtual ~VrShell();
void DrawVrShell();
@@ -84,6 +106,9 @@ class VrShell : public device::GvrDelegate {
gvr::Sizei render_size_;
+ std::unique_ptr<VrCompositor> content_compositor_view_;
+ content::ContentViewCore* content_cvc_;
+
std::unique_ptr<VrShellRenderer> vr_shell_renderer_;
base::android::ScopedJavaGlobalRef<jobject> j_vr_shell_;
« no previous file with comments | « chrome/browser/android/vr_shell/vr_compositor.cc ('k') | chrome/browser/android/vr_shell/vr_shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698