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

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

Issue 2890563003: VR: Update UiSceneManager with audio/video capturing flags (Closed)
Patch Set: 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 unified diff | Download patch
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 1360 matching lines...) Expand 10 before | Expand all | Expand 10 after
1371 } 1371 }
1372 1372
1373 base::WeakPtr<VrShellGl> VrShellGl::GetWeakPtr() { 1373 base::WeakPtr<VrShellGl> VrShellGl::GetWeakPtr() {
1374 return weak_ptr_factory_.GetWeakPtr(); 1374 return weak_ptr_factory_.GetWeakPtr();
1375 } 1375 }
1376 1376
1377 void VrShellGl::SetControllerModel(std::unique_ptr<VrControllerModel> model) { 1377 void VrShellGl::SetControllerModel(std::unique_ptr<VrControllerModel> model) {
1378 vr_shell_renderer_->GetControllerRenderer()->SetUp(std::move(model)); 1378 vr_shell_renderer_->GetControllerRenderer()->SetUp(std::move(model));
1379 } 1379 }
1380 1380
1381 void VrShellGl::SetAudioCapturingWarning(bool is_capturing) {
1382 // TODO inform scene_;
1383 }
1384
1385 void VrShellGl::SetVideoCapturingWarning(bool is_capturing) {
1386 // TODO inform scene_;
1387 }
1388
1389 void VrShellGl::SetScreenCapturingWarning(bool is_capturing) {
1390 // TODO inform scene_;
1391 }
1392
1393 void VrShellGl::OnVSync() { 1381 void VrShellGl::OnVSync() {
1394 while (premature_received_frames_ > 0) { 1382 while (premature_received_frames_ > 0) {
1395 TRACE_EVENT0("gpu", "VrShellGl::OnWebVRFrameAvailableRetry"); 1383 TRACE_EVENT0("gpu", "VrShellGl::OnWebVRFrameAvailableRetry");
1396 --premature_received_frames_; 1384 --premature_received_frames_;
1397 OnWebVRFrameAvailable(); 1385 OnWebVRFrameAvailable();
1398 } 1386 }
1399 1387
1400 base::TimeTicks now = base::TimeTicks::Now(); 1388 base::TimeTicks now = base::TimeTicks::Now();
1401 base::TimeTicks target; 1389 base::TimeTicks target;
1402 1390
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
1476 // This assumes that the initial webvr_surface_size_ was set to the 1464 // This assumes that the initial webvr_surface_size_ was set to the
1477 // appropriate recommended render resolution as the default size during 1465 // appropriate recommended render resolution as the default size during
1478 // InitializeGl. Revisit if the initialization order changes. 1466 // InitializeGl. Revisit if the initialization order changes.
1479 device::mojom::VRDisplayInfoPtr info = 1467 device::mojom::VRDisplayInfoPtr info =
1480 device::GvrDelegate::CreateVRDisplayInfo(gvr_api_.get(), 1468 device::GvrDelegate::CreateVRDisplayInfo(gvr_api_.get(),
1481 webvr_surface_size_, device_id); 1469 webvr_surface_size_, device_id);
1482 browser_->RunVRDisplayInfoCallback(callback, &info); 1470 browser_->RunVRDisplayInfoCallback(callback, &info);
1483 } 1471 }
1484 1472
1485 } // namespace vr_shell 1473 } // namespace vr_shell
OLDNEW
« chrome/browser/android/vr_shell/vr_shell.cc ('K') | « chrome/browser/android/vr_shell/vr_shell_gl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698