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

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
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 b415f2ab5a2692a16c498f296f27f4de6b037f72..caa2ac6750675acfe2104b3c7aff168b51e4e9de 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();
@@ -81,6 +103,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_;

Powered by Google App Engine
This is Rietveld 408576698