| 923 | } |
| 924 | |
| 925 | bool XRInterface::endRenderFrame() { |
| 926 | #if CC_USE_XR |
| 927 | if (IS_ENABLE_XR_LOG) { |
| 928 | CC_LOG_INFO("[XR] endRenderFrame.%d", |
| 929 | cc::ApplicationManager::getInstance()->getCurrentAppSafe()->getEngine()->getTotalFrames()); |
| 930 | } |
| 931 | |
| 932 | if (gfx::DeviceAgent::getInstance()) { |
| 933 | ENQUEUE_MESSAGE_0(gfx::DeviceAgent::getInstance()->getMessageQueue(), |
| 934 | EndRenderFrame, |
| 935 | { |
| 936 | xr::XrEntry::getInstance()->frameEnd(); |
| 937 | gfx::DeviceAgent::getInstance()->presentSignal(); |
| 938 | if (IS_ENABLE_XR_LOG) CC_LOG_INFO("[XR] [RT] presentSignal endRenderFrame.%d", |
| 939 | cc::ApplicationManager::getInstance()->getCurrentAppSafe()->getEngine()->getTotalFrames()); |
| 940 | }) |
| 941 | _committedFrame = true; |
| 942 | // CC_LOG_INFO("[XR] endRenderFrame pass presentWait errno %d", errno); |
| 943 | } else { |
| 944 | xr::XrEntry::getInstance()->frameEnd(); |
| 945 | #if CC_USE_XR_REMOTE_PREVIEW |
| 946 | if (_xrRemotePreviewManager) { |
| 947 | _xrRemotePreviewManager->tick(); |
| 948 | } |
| 949 | #endif |
| 950 | } |
| 951 | #endif |
| 952 | return true; |
| 953 | } |
| 954 | |
| 955 | bool XRInterface::platformLoopEnd() { |
| 956 | #if CC_USE_XR |
no test coverage detected