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

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: rebase 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
« no previous file with comments | « chrome/browser/android/vr_shell/vr_shell_gl.h ('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 1363 matching lines...) Expand 10 before | Expand all | Expand 10 after
1374 } 1374 }
1375 1375
1376 base::WeakPtr<VrShellGl> VrShellGl::GetWeakPtr() { 1376 base::WeakPtr<VrShellGl> VrShellGl::GetWeakPtr() {
1377 return weak_ptr_factory_.GetWeakPtr(); 1377 return weak_ptr_factory_.GetWeakPtr();
1378 } 1378 }
1379 1379
1380 void VrShellGl::SetControllerModel(std::unique_ptr<VrControllerModel> model) { 1380 void VrShellGl::SetControllerModel(std::unique_ptr<VrControllerModel> model) {
1381 vr_shell_renderer_->GetControllerRenderer()->SetUp(std::move(model)); 1381 vr_shell_renderer_->GetControllerRenderer()->SetUp(std::move(model));
1382 } 1382 }
1383 1383
1384 void VrShellGl::SetAudioCapturingWarning(bool is_capturing) {
1385 // TODO inform scene_;
1386 }
1387
1388 void VrShellGl::SetVideoCapturingWarning(bool is_capturing) {
1389 // TODO inform scene_;
1390 }
1391
1392 void VrShellGl::SetScreenCapturingWarning(bool is_capturing) {
1393 // TODO inform scene_;
1394 }
1395
1396 void VrShellGl::OnVSync() { 1384 void VrShellGl::OnVSync() {
1397 while (premature_received_frames_ > 0) { 1385 while (premature_received_frames_ > 0) {
1398 TRACE_EVENT0("gpu", "VrShellGl::OnWebVRFrameAvailableRetry"); 1386 TRACE_EVENT0("gpu", "VrShellGl::OnWebVRFrameAvailableRetry");
1399 --premature_received_frames_; 1387 --premature_received_frames_;
1400 OnWebVRFrameAvailable(); 1388 OnWebVRFrameAvailable();
1401 } 1389 }
1402 1390
1403 base::TimeTicks now = base::TimeTicks::Now(); 1391 base::TimeTicks now = base::TimeTicks::Now();
1404 base::TimeTicks target; 1392 base::TimeTicks target;
1405 1393
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
1479 // This assumes that the initial webvr_surface_size_ was set to the 1467 // This assumes that the initial webvr_surface_size_ was set to the
1480 // appropriate recommended render resolution as the default size during 1468 // appropriate recommended render resolution as the default size during
1481 // InitializeGl. Revisit if the initialization order changes. 1469 // InitializeGl. Revisit if the initialization order changes.
1482 device::mojom::VRDisplayInfoPtr info = 1470 device::mojom::VRDisplayInfoPtr info =
1483 device::GvrDelegate::CreateVRDisplayInfo(gvr_api_.get(), 1471 device::GvrDelegate::CreateVRDisplayInfo(gvr_api_.get(),
1484 webvr_surface_size_, device_id); 1472 webvr_surface_size_, device_id);
1485 browser_->RunVRDisplayInfoCallback(callback, &info); 1473 browser_->RunVRDisplayInfoCallback(callback, &info);
1486 } 1474 }
1487 1475
1488 } // namespace vr_shell 1476 } // namespace vr_shell
OLDNEW
« no previous file with comments | « 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