| OLD | NEW |
| 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 "modules/vr/VRDisplay.h" | 5 #include "modules/vr/VRDisplay.h" |
| 6 | 6 |
| 7 #include "core/css/StylePropertySet.h" | 7 #include "core/css/StylePropertySet.h" |
| 8 #include "core/dom/DOMException.h" | 8 #include "core/dom/DOMException.h" |
| 9 #include "core/dom/FrameRequestCallback.h" | 9 #include "core/dom/FrameRequestCallback.h" |
| 10 #include "core/dom/ScriptedAnimationController.h" | 10 #include "core/dom/ScriptedAnimationController.h" |
| (...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 593 } | 593 } |
| 594 } | 594 } |
| 595 } | 595 } |
| 596 | 596 |
| 597 m_pendingPreviousFrameRender = true; | 597 m_pendingPreviousFrameRender = true; |
| 598 m_pendingSubmitFrame = true; | 598 m_pendingSubmitFrame = true; |
| 599 m_display->SubmitFrame( | 599 m_display->SubmitFrame( |
| 600 m_vrFrameId, gpu::MailboxHolder(staticImage->mailbox(), | 600 m_vrFrameId, gpu::MailboxHolder(staticImage->mailbox(), |
| 601 staticImage->syncToken(), GL_TEXTURE_2D)); | 601 staticImage->syncToken(), GL_TEXTURE_2D)); |
| 602 | 602 |
| 603 // If preserveDrawingBuffer is false, must clear now. Normally this |
| 604 // happens as part of compositing, but that's not active while |
| 605 // presenting, so run the responsible code directly. |
| 606 m_renderingContext->markCompositedAndClearBackbufferIfNeeded(); |
| 607 |
| 603 // If we're not deferring the wait for transferring the mailbox, | 608 // If we're not deferring the wait for transferring the mailbox, |
| 604 // we need to wait for it now to prevent the image going out of | 609 // we need to wait for it now to prevent the image going out of |
| 605 // scope before its mailbox is retrieved. | 610 // scope before its mailbox is retrieved. |
| 606 if (!waitForPreviousTransferToFinish) { | 611 if (!waitForPreviousTransferToFinish) { |
| 607 TRACE_EVENT0("gpu", "waitForCurrentTransferToFinish"); | 612 TRACE_EVENT0("gpu", "waitForCurrentTransferToFinish"); |
| 608 while (m_pendingSubmitFrame) { | 613 while (m_pendingSubmitFrame) { |
| 609 if (!m_submit_frame_client_binding.WaitForIncomingMethodCall()) { | 614 if (!m_submit_frame_client_binding.WaitForIncomingMethodCall()) { |
| 610 DLOG(ERROR) << "Failed to receive SubmitFrame response"; | 615 DLOG(ERROR) << "Failed to receive SubmitFrame response"; |
| 611 break; | 616 break; |
| 612 } | 617 } |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 804 visitor->trace(m_stageParameters); | 809 visitor->trace(m_stageParameters); |
| 805 visitor->trace(m_eyeParametersLeft); | 810 visitor->trace(m_eyeParametersLeft); |
| 806 visitor->trace(m_eyeParametersRight); | 811 visitor->trace(m_eyeParametersRight); |
| 807 visitor->trace(m_layer); | 812 visitor->trace(m_layer); |
| 808 visitor->trace(m_renderingContext); | 813 visitor->trace(m_renderingContext); |
| 809 visitor->trace(m_scriptedAnimationController); | 814 visitor->trace(m_scriptedAnimationController); |
| 810 visitor->trace(m_pendingPresentResolvers); | 815 visitor->trace(m_pendingPresentResolvers); |
| 811 } | 816 } |
| 812 | 817 |
| 813 } // namespace blink | 818 } // namespace blink |
| OLD | NEW |