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

Unified Diff: chrome/browser/ui/webui/vr_shell/vr_shell_ui_message_handler.cc

Issue 2574313002: Clean up threading around VR Scene updates. (Closed)
Patch Set: rebase Created 4 years 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
« no previous file with comments | « chrome/browser/android/vr_shell/vr_shell_gl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/vr_shell/vr_shell_ui_message_handler.cc
diff --git a/chrome/browser/ui/webui/vr_shell/vr_shell_ui_message_handler.cc b/chrome/browser/ui/webui/vr_shell/vr_shell_ui_message_handler.cc
index 3670e28cd842dc74dec67b3b89177bf32342a401..64774efbc464a46fd6b244df210bb11cee15bca9 100644
--- a/chrome/browser/ui/webui/vr_shell/vr_shell_ui_message_handler.cc
+++ b/chrome/browser/ui/webui/vr_shell/vr_shell_ui_message_handler.cc
@@ -58,16 +58,7 @@ void VrShellUIMessageHandler::OnJavascriptAllowed() {
void VrShellUIMessageHandler::HandleUpdateScene(const base::ListValue* args) {
if (!vr_shell_)
return;
-
- // Copy the update instructions and handle them on the render thread.
- // TODO(mthiesse): Clean this up.
- auto cb = base::Bind(&vr_shell::UiScene::HandleCommands,
- // Unretained is safe because this callback will only be
- // run on the GL thread, which owns the scene.
- base::Unretained(vr_shell_->GetScene()),
- base::Owned(args->CreateDeepCopy().release()),
- vr_shell::UiScene::TimeInMicroseconds());
- vr_shell_->QueueTask(cb);
+ vr_shell_->UpdateScene(args);
}
void VrShellUIMessageHandler::HandleDoAction(const base::ListValue* args) {
« no previous file with comments | « chrome/browser/android/vr_shell/vr_shell_gl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698