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

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

Issue 2869273008: VR: Fix cursor draw order. (Closed)
Patch Set: Address comments Created 3 years, 7 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_gl.h
diff --git a/chrome/browser/android/vr_shell/vr_shell_gl.h b/chrome/browser/android/vr_shell/vr_shell_gl.h
index 5da1123ffc9e45def827eb7875c5a7aa3a5cda10..c41e1eb518e3bd35cc52e443766b0aaa13bd6e1c 100644
--- a/chrome/browser/android/vr_shell/vr_shell_gl.h
+++ b/chrome/browser/android/vr_shell/vr_shell_gl.h
@@ -120,11 +120,14 @@ class VrShellGl : public device::mojom::VRVSyncProvider {
int viewport_offset,
bool draw_cursor);
void DrawElements(const vr::Mat4f& view_proj_matrix,
- const std::vector<const UiElement*>& elements);
+ const std::vector<const UiElement*>& elements,
+ bool draw_cursor);
+ void DrawElement(const vr::Mat4f& view_proj_matrix, const UiElement& element);
std::vector<const UiElement*> GetElementsInDrawOrder(
const vr::Mat4f& view_matrix,
const std::vector<const UiElement*>& elements);
- void DrawCursor(const vr::Mat4f& render_matrix);
+ void DrawReticle(const vr::Mat4f& view_proj_matrix);
+ void DrawLaser(const vr::Mat4f& view_proj_matrix);
void DrawController(const vr::Mat4f& view_proj_matrix);
bool ShouldDrawWebVr();
void DrawWebVr();
@@ -218,7 +221,7 @@ class VrShellGl : public device::mojom::VRVSyncProvider {
// TODO(mthiesse): We need to handle elements being removed, and update this
// state appropriately.
- UiElement* cursor_render_target_ = nullptr;
+ UiElement* reticle_render_target_ = nullptr;
UiElement* hover_target_ = nullptr;
// TODO(mthiesse): We shouldn't have a fling target. Elements should fling
// independently and we should only cancel flings on the relevant element

Powered by Google App Engine
This is Rietveld 408576698