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

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

Issue 2878893003: VR: Poll media access flags (Closed)
Patch Set: VR: Poll media access flags 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 1251 matching lines...) Expand 10 before | Expand all | Expand 10 after
1262 } 1262 }
1263 1263
1264 base::WeakPtr<VrShellGl> VrShellGl::GetWeakPtr() { 1264 base::WeakPtr<VrShellGl> VrShellGl::GetWeakPtr() {
1265 return weak_ptr_factory_.GetWeakPtr(); 1265 return weak_ptr_factory_.GetWeakPtr();
1266 } 1266 }
1267 1267
1268 void VrShellGl::SetControllerModel(std::unique_ptr<VrControllerModel> model) { 1268 void VrShellGl::SetControllerModel(std::unique_ptr<VrControllerModel> model) {
1269 vr_shell_renderer_->GetControllerRenderer()->SetUp(std::move(model)); 1269 vr_shell_renderer_->GetControllerRenderer()->SetUp(std::move(model));
1270 } 1270 }
1271 1271
1272 void VrShellGl::SetAudioCapturingWarning(bool is_capturing) {
1273 // TODO inform scene_;
1274 }
1275
1276 void VrShellGl::SetVideoCapturingWarning(bool is_capturing) {
1277 // TODO inform scene_;
1278 }
1279
1280 void VrShellGl::SetScreenCapturingWarning(bool is_capturing) {
1281 // TODO inform scene_;
1282 }
1283
1272 void VrShellGl::OnVSync() { 1284 void VrShellGl::OnVSync() {
1273 while (premature_received_frames_ > 0) { 1285 while (premature_received_frames_ > 0) {
1274 TRACE_EVENT0("gpu", "VrShellGl::OnWebVRFrameAvailableRetry"); 1286 TRACE_EVENT0("gpu", "VrShellGl::OnWebVRFrameAvailableRetry");
1275 --premature_received_frames_; 1287 --premature_received_frames_;
1276 OnWebVRFrameAvailable(); 1288 OnWebVRFrameAvailable();
1277 } 1289 }
1278 1290
1279 base::TimeTicks now = base::TimeTicks::Now(); 1291 base::TimeTicks now = base::TimeTicks::Now();
1280 base::TimeTicks target; 1292 base::TimeTicks target;
1281 1293
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
1358 // InitializeGl. Revisit if the initialization order changes. 1370 // InitializeGl. Revisit if the initialization order changes.
1359 device::mojom::VRDisplayInfoPtr info = 1371 device::mojom::VRDisplayInfoPtr info =
1360 device::GvrDelegate::CreateVRDisplayInfo(gvr_api_.get(), 1372 device::GvrDelegate::CreateVRDisplayInfo(gvr_api_.get(),
1361 webvr_surface_size_, device_id); 1373 webvr_surface_size_, device_id);
1362 main_thread_task_runner_->PostTask( 1374 main_thread_task_runner_->PostTask(
1363 FROM_HERE, 1375 FROM_HERE,
1364 base::Bind(&RunVRDisplayInfoCallback, callback, base::Passed(&info))); 1376 base::Bind(&RunVRDisplayInfoCallback, callback, base::Passed(&info)));
1365 } 1377 }
1366 1378
1367 } // namespace vr_shell 1379 } // 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