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

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

Issue 2354373002: Implement UI web contents for Vr Shell (Closed)
Patch Set: Add new deps 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 8ad2e044a44c0ad6da5aaa0dfeffe49bb63aa6fc..25c11d381f8b51d7fc311768c65d60118fc15a77 100644
--- a/chrome/browser/android/vr_shell/vr_shell.h
+++ b/chrome/browser/android/vr_shell/vr_shell.h
@@ -33,8 +33,10 @@ class VrShellRenderer;
class VrShell : public device::GvrDelegate {
public:
VrShell(JNIEnv* env, jobject obj,
- content::ContentViewCore* content_view_core,
- ui::WindowAndroid* content_window);
+ content::ContentViewCore* content_cvc,
+ ui::WindowAndroid* content_window,
+ content::ContentViewCore* ui_cvc,
+ ui::WindowAndroid* ui_window);
void UpdateCompositorLayers(JNIEnv* env,
const base::android::JavaParamRef<jobject>& obj);
@@ -44,7 +46,8 @@ class VrShell : public device::GvrDelegate {
jlong native_gvr_api);
void InitializeGl(JNIEnv* env,
const base::android::JavaParamRef<jobject>& obj,
- jint texture_data_handle);
+ jint content_texture_handle,
+ jint ui_texture_handle);
void DrawFrame(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj);
void OnPause(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj);
void OnResume(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj);
@@ -57,18 +60,22 @@ 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);
+ void UiSurfaceChanged(
+ JNIEnv* env,
+ const base::android::JavaParamRef<jobject>& object,
+ jint width,
+ jint height,
+ const base::android::JavaParamRef<jobject>& surface);
private:
virtual ~VrShell();
+ void LoadUIContent();
void DrawVrShell();
void DrawEye(const gvr::Mat4f& view_matrix,
const gvr::BufferViewport& params);
@@ -82,7 +89,9 @@ class VrShell : public device::GvrDelegate {
float scree_tilt);
void UpdateController();
- // samplerExternalOES texture data for content area image.
+ // samplerExternalOES texture data for UI content image.
+ jint ui_texture_id_ = 0;
+ // samplerExternalOES texture data for main content image.
jint content_texture_id_ = 0;
float desktop_screen_tilt_;
@@ -106,8 +115,11 @@ class VrShell : public device::GvrDelegate {
gvr::Sizei render_size_;
- std::unique_ptr<VrCompositor> content_compositor_view_;
+ std::unique_ptr<VrCompositor> content_compositor_;
content::ContentViewCore* content_cvc_;
+ std::unique_ptr<VrCompositor> ui_compositor_;
+ content::ContentViewCore* ui_cvc_;
+
std::unique_ptr<VrShellRenderer> vr_shell_renderer_;
base::android::ScopedJavaGlobalRef<jobject> j_vr_shell_;

Powered by Google App Engine
This is Rietveld 408576698