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

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

Issue 2508703002: WebVR: Use content CVC size for compositor rendering (Closed)
Patch Set: Undo VrShellImpl changes, use native-side values. Created 4 years, 1 month 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 bafc18010f62af7a960beb9f0034621620979986..21502f0f497b29163c5178b6327328233ff3cf2d 100644
--- a/chrome/browser/android/vr_shell/vr_shell.h
+++ b/chrome/browser/android/vr_shell/vr_shell.h
@@ -96,6 +96,8 @@ class VrShell : public device::GvrDelegate, content::WebContentsObserver {
const gvr::Rectf& right_bounds) override;
gvr::GvrApi* gvr_api() override;
void SetGvrPoseForWebVr(const gvr::Mat4f& pose, uint32_t pose_num) override;
+ void SetWebVRRenderSurfaceSize(int width, int height) override;
+ gvr::Sizei GetWebVRCompositorSurfaceSize() override;
void ContentSurfaceChanged(
JNIEnv* env,
@@ -122,7 +124,8 @@ class VrShell : public device::GvrDelegate, content::WebContentsObserver {
void LoadUIContent();
void DrawVrShell(const gvr::Mat4f& head_pose, gvr::Frame &frame);
void DrawUiView(const gvr::Mat4f* head_pose,
- const std::vector<const ContentRectangle*>& elements);
+ const std::vector<const ContentRectangle*>& elements,
+ const gvr::Sizei& render_size, int viewport_offset);
void DrawElements(const gvr::Mat4f& render_matrix,
const std::vector<const ContentRectangle*>& elements);
void DrawCursor(const gvr::Mat4f& render_matrix);
@@ -156,7 +159,8 @@ class VrShell : public device::GvrDelegate, content::WebContentsObserver {
std::unique_ptr<gvr::BufferViewport> webvr_right_viewport_;
std::unique_ptr<gvr::SwapChain> swap_chain_;
- gvr::Sizei render_size_;
+ gvr::Sizei render_size_primary_;
+ gvr::Sizei render_size_headlocked_;
std::queue<base::Callback<void()>> task_queue_;
base::Lock task_queue_lock_;
@@ -184,12 +188,16 @@ class VrShell : public device::GvrDelegate, content::WebContentsObserver {
int content_tex_height_ = 0;
bool webvr_mode_ = false;
+ bool webvr_needs_ui_ = false;
mthiesse 2016/11/16 21:30:41 Seems unused, remove?
// The pose ring buffer size must be a power of two to avoid glitches when
// the pose index wraps around. It should be large enough to handle the
// current backlog of poses which is 2-3 frames.
static constexpr int kPoseRingBufferSize = 8;
std::vector<gvr::Mat4f> webvr_head_pose_;
+ jint webvr_texture_id_ = 0;
+ int webvr_width_ = 2048;
mthiesse 2016/11/16 21:30:41 magic numbers to constants somewhere? Also why the
+ int webvr_height_ = 1200;
std::unique_ptr<VrController> controller_;
scoped_refptr<VrInputManager> content_input_manager_;
« no previous file with comments | « no previous file | chrome/browser/android/vr_shell/vr_shell.cc » ('j') | chrome/browser/android/vr_shell/vr_shell.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698