Index: chrome/browser/android/vr_shell/vr_shell_gl.cc |
diff --git a/chrome/browser/android/vr_shell/vr_shell_gl.cc b/chrome/browser/android/vr_shell/vr_shell_gl.cc |
index a2ac61588d22344527cf9a215cd35587f0e756c6..6799881daeeb32801cd582500274040985be0b59 100644 |
--- a/chrome/browser/android/vr_shell/vr_shell_gl.cc |
+++ b/chrome/browser/android/vr_shell/vr_shell_gl.cc |
@@ -169,6 +169,11 @@ int GetPixelEncodedPoseIndexByte() { |
return -1; |
} |
+int64_t TimeInMicroseconds() { |
+ return std::chrono::duration_cast<std::chrono::microseconds>( |
+ std::chrono::steady_clock::now().time_since_epoch()).count(); |
+} |
+ |
} // namespace |
VrShellGl::VrShellGl( |
@@ -650,7 +655,7 @@ void VrShellGl::DrawFrame() { |
// Update the render position of all UI elements (including desktop). |
const float screen_tilt = kDesktopScreenTiltDefault * M_PI / 180.0f; |
- scene_->UpdateTransforms(screen_tilt, UiScene::TimeInMicroseconds()); |
+ scene_->UpdateTransforms(screen_tilt, TimeInMicroseconds()); |
UpdateController(GetForwardVector(head_pose)); |
@@ -1010,4 +1015,8 @@ void VrShellGl::ForceExitVR() { |
FROM_HERE, base::Bind(&VrShell::ForceExitVR, weak_vr_shell_)); |
} |
+void VrShellGl::UpdateScene(std::unique_ptr<base::ListValue> commands) { |
+ scene_->HandleCommands(std::move(commands), TimeInMicroseconds()); |
+} |
+ |
} // namespace vr_shell |