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

Side by Side Diff: chrome/browser/android/vr_shell/vr_shell_gl.cc

Issue 2955483003: Show splash screen when entering VR from a deep-link (Closed)
Patch Set: fix compile error on bots Created 3 years, 5 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/android/vr_shell/vr_shell.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/android/vr_shell/vr_shell_gl.h" 5 #include "chrome/browser/android/vr_shell/vr_shell_gl.h"
6 6
7 #include <chrono> 7 #include <chrono>
8 #include <limits> 8 #include <limits>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 1176 matching lines...) Expand 10 before | Expand all | Expand 10 after
1187 glDepthMask(GL_TRUE); 1187 glDepthMask(GL_TRUE);
1188 1188
1189 const SkColor backgroundColor = scene_->GetWorldBackgroundColor(); 1189 const SkColor backgroundColor = scene_->GetWorldBackgroundColor();
1190 glClearColor(SkColorGetR(backgroundColor) / 255.0, 1190 glClearColor(SkColorGetR(backgroundColor) / 255.0,
1191 SkColorGetG(backgroundColor) / 255.0, 1191 SkColorGetG(backgroundColor) / 255.0,
1192 SkColorGetB(backgroundColor) / 255.0, 1192 SkColorGetB(backgroundColor) / 255.0,
1193 SkColorGetA(backgroundColor) / 255.0); 1193 SkColorGetA(backgroundColor) / 255.0);
1194 glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); 1194 glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
1195 } 1195 }
1196 std::vector<const UiElement*> elements = scene_->GetWorldElements(); 1196 std::vector<const UiElement*> elements = scene_->GetWorldElements();
1197 const bool draw_reticle = !(scene_->is_exiting() || ShouldDrawWebVr()); 1197 const bool draw_reticle =
1198 !(scene_->is_exiting() || scene_->showing_splash_screen() ||
1199 ShouldDrawWebVr());
1198 DrawUiView(head_pose, elements, render_size_primary_, 1200 DrawUiView(head_pose, elements, render_size_primary_,
1199 kViewportListPrimaryOffset, draw_reticle); 1201 kViewportListPrimaryOffset, draw_reticle);
1200 } 1202 }
1201 1203
1202 void VrShellGl::DrawOverlayElements(const gfx::Transform& head_pose) { 1204 void VrShellGl::DrawOverlayElements(const gfx::Transform& head_pose) {
1203 std::vector<const UiElement*> elements = scene_->GetOverlayElements(); 1205 std::vector<const UiElement*> elements = scene_->GetOverlayElements();
1204 if (elements.empty()) 1206 if (elements.empty())
1205 return; 1207 return;
1206 1208
1207 glDisable(GL_CULL_FACE); 1209 glDisable(GL_CULL_FACE);
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
1632 // This assumes that the initial webvr_surface_size_ was set to the 1634 // This assumes that the initial webvr_surface_size_ was set to the
1633 // appropriate recommended render resolution as the default size during 1635 // appropriate recommended render resolution as the default size during
1634 // InitializeGl. Revisit if the initialization order changes. 1636 // InitializeGl. Revisit if the initialization order changes.
1635 device::mojom::VRDisplayInfoPtr info = 1637 device::mojom::VRDisplayInfoPtr info =
1636 device::GvrDelegate::CreateVRDisplayInfo(gvr_api_.get(), 1638 device::GvrDelegate::CreateVRDisplayInfo(gvr_api_.get(),
1637 webvr_surface_size_, device_id); 1639 webvr_surface_size_, device_id);
1638 browser_->RunVRDisplayInfoCallback(callback, &info); 1640 browser_->RunVRDisplayInfoCallback(callback, &info);
1639 } 1641 }
1640 1642
1641 } // namespace vr_shell 1643 } // namespace vr_shell
OLDNEW
« no previous file with comments | « chrome/browser/android/vr_shell/vr_shell.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698