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

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

Issue 2301633002: Refactor Vr activity into ChromeTabbedActivity. (Closed)
Patch Set: Address comments and rebase 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 4fcff02aca8e683e1b218bd9d2cd14a4118cbffa..c06826eafa46bb16d94d3c7406cd9fbdf6f20b10 100644
--- a/chrome/browser/android/vr_shell/vr_shell.h
+++ b/chrome/browser/android/vr_shell/vr_shell.h
@@ -7,32 +7,24 @@
#include <jni.h>
#include <memory>
+#include <vector>
#include "base/android/jni_weak_ref.h"
#include "base/macros.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 vr_shell {
class VrShellRenderer;
-class ContentRect {
- public:
- ContentRect();
- ~ContentRect();
- void SetIdentity();
- void Translate(float x, float y, float z);
- gvr::Mat4f transfrom_to_world;
- int content_texture_handle;
-};
-
class VrShell {
public:
VrShell(JNIEnv* env, jobject obj);
void Destroy(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj);
-
void GvrInit(JNIEnv* env,
const base::android::JavaParamRef<jobject>& obj,
jlong native_gvr_api);
@@ -45,12 +37,25 @@ class VrShell {
private:
~VrShell();
-
void DrawEye(const gvr::Mat4f& view_matrix,
const gvr::BufferViewport& params);
- void DrawContentRect();
+ void DrawUI();
+
+ void UpdateTransforms(float screen_width_meters,
+ float screen_height_meters,
+ float scree_tilt);
+
+ // samplerExternalOES texture data for desktop content image.
bshe 2016/09/09 14:42:10 desktop might be misleading. Perhaps remove "deskt
mthiesse 2016/09/09 15:16:38 Done.
+ jint content_texture_id_ = 0;
+
+ float desktop_screen_tilt_;
+ float desktop_height_;
+
+ ContentRectangle* desktop_plane_;
+ gvr::Vec3f desktop_position_;
+
+ std::vector<std::unique_ptr<ContentRectangle>> ui_rects_;
- std::unique_ptr<ContentRect> content_rect_;
std::unique_ptr<gvr::GvrApi> gvr_api_;
std::unique_ptr<gvr::BufferViewportList> buffer_viewport_list_;
std::unique_ptr<gvr::BufferViewport> buffer_viewport_;
@@ -64,7 +69,6 @@ class VrShell {
gvr::Sizei render_size_;
std::unique_ptr<VrShellRenderer> vr_shell_renderer_;
-
base::android::ScopedJavaGlobalRef<jobject> j_vr_shell_;
DISALLOW_COPY_AND_ASSIGN(VrShell);

Powered by Google App Engine
This is Rietveld 408576698